From owner-freebsd-current@freebsd.org Sun Dec 22 01:27:40 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 19AEF1E2844 for ; Sun, 22 Dec 2019 01:27:40 +0000 (UTC) (envelope-from mckusick@freebsd.org) Received: from chez.mckusick.com (chez.mckusick.com [70.36.157.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47gPx74tyZz3N1s for ; Sun, 22 Dec 2019 01:27:39 +0000 (UTC) (envelope-from mckusick@freebsd.org) Received: from chez.mckusick.com (localhost [IPv6:::1]) by chez.mckusick.com (8.15.2/8.15.2) with ESMTP id xBM1gAvt000328; Sat, 21 Dec 2019 17:42:10 -0800 (PST) (envelope-from mckusick@freebsd.org) Message-Id: <201912220142.xBM1gAvt000328@chez.mckusick.com> From: Kirk McKusick To: sgk@troutmask.apl.washington.edu Subject: Re: [PATCH] Typo in hastd.8 man page cc: freebsd-current@freebsd.org X-URL: http://WWW.McKusick.COM/ Reply-To: Kirk McKusick In-reply-to: <20191221200347.GA34388@troutmask.apl.washington.edu> Comments: In-reply-to Steve Kargl message dated "Sat, 21 Dec 2019 12:03:47 -0800." MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <326.1576978930.1@chez.mckusick.com> Date: Sat, 21 Dec 2019 17:42:10 -0800 X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,MISSING_MID, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on chez.mckusick.com X-Rspamd-Queue-Id: 47gPx74tyZz3N1s X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.85 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.87)[-0.865,0]; NEURAL_HAM_LONG(-0.99)[-0.988,0]; ASN(0.00)[asn:46375, ipnet:70.36.128.0/19, country:US] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Dec 2019 01:27:40 -0000 > Date: Sat, 21 Dec 2019 12:03:47 -0800 > From: Steve Kargl > To: freebsd-current@freebsd.org > Subject: [PATCH] Typo in hastd.8 man page > > Path should explain the issue. > > Index: hastd.8 > =================================================================== > --- hastd.8 (revision 355983) > +++ hastd.8 (working copy) > @@ -44,7 +44,7 @@ > daemon is responsible for managing highly available GEOM providers. > .Pp > .Nm > -allows the transpaent storage of data on two physically separated machines > +allows the transparent storage of data on two physically separated machines > connected over a TCP/IP network. > Only one machine (cluster node) can actively use storage provided by > .Nm . > > -- > Steve Fixed in -r355995, thanks. Kirk McKusick From owner-freebsd-current@freebsd.org Sun Dec 22 19:39:25 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9B9B31DB0AA for ; Sun, 22 Dec 2019 19:39:25 +0000 (UTC) (envelope-from salvadore@FreeBSD.org) Received: from MailHost (unknown [80.211.33.142]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47gt8s226Xz3Gkl for ; Sun, 22 Dec 2019 19:39:25 +0000 (UTC) (envelope-from salvadore@FreeBSD.org) Received: from root (uid 0) (envelope-from salvadore@FreeBSD.org) id c45d by MailHost (DragonFly Mail Agent v0.11+); Sun, 22 Dec 2019 20:34:22 +0100 To: freebsd-current@FreeBSD.org Subject: [LAST OFFICIAL REMINDER] Call for 2019Q4 quarterly status reports Date: Sun, 22 Dec 2019 20:34:22 +0100 Message-Id: <5dffc53e.c45d.1b916b0c@MailHost> From: X-Rspamd-Queue-Id: 47gt8s226Xz3Gkl X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.94)[-0.938,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:31034, ipnet:80.211.0.0/17, country:IT] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Dec 2019 19:39:25 -0000 Dear FreeBSD Community, The deadline for the next FreeBSD Quarterly Status update is January 1, 2020, for work done since the last round of Quarterly Reports: October, 2019 - December, 2019. Starting with this quarter, reports will be collected during the last month of every quarter (instead of the first month of the next quarter, as was previously the case). Status report submissions do not need to be very long. They may be about anything happening in the FreeBSD project and community, and provide a great way to inform FreeBSD users and developers about work that is underway or has been completed. Report submissions are not limited to committers; anyone doing anything interesting and FreeBSD related can -- and should -- write one! The preferred method is to follow the guidelines at the Quarterly GitHub repository: https://github.com/freebsd/freebsd-quarterly Alternatively you can fetch the Markdown template, fill it in, and email it to quarterly@FreeBSD.org. The template can be found at: https://raw.githubusercontent.com/freebsd/freebsd-quarterly/master/report-sample.md We look forward to seeing your 2019Q4 reports! Thanks, Lorenzo Salvadore (on behalf of quarterly@) From owner-freebsd-current@freebsd.org Mon Dec 23 05:41:55 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8E7BA1E614F for ; Mon, 23 Dec 2019 05:41:55 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic302-20.consmr.mail.gq1.yahoo.com (sonic302-20.consmr.mail.gq1.yahoo.com [98.137.68.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47h7X22JfJz4GC8 for ; Mon, 23 Dec 2019 05:41:54 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: 4YgRQwsVM1n5nX1hjP.X5FpEf6UgfhSJqA8TV2u5JklgRJWa9COLp94MUOnrZRM cf5L_o90vd5eXWeTMtsXpqrwf3GMOItsJUn09qAMJEMu8HdzkKS_2W2twal7LGYCLlkLIGzSaPha vgJ2prKoATdoEiTSgDPwo8hxApvISKTYguTHFArpISHUeU0MPUwWTxqrbuW8qSlII0Q7w7M9jbZ3 s30fYhruLCLngZpI9_S739duMCtdAAUg.p87e7HSBqPPKQh5.vtA2oixKk4.1wck.A_AavEUmfgC Xc3aueGqqYO4yNTR_TY5e3uK7O2HCYHQCNrAIgvAAFwFmXe2MuYRlDepOOrWk3oorunNuotBotJV q1kJI22WQAxOf7zzVybSYSyzyE1YHGDD9u9e1S.ILIkeA8cvUuAHmJZb8CcKK5fZnx2q4WenHO2j k72qecQMPG5PjPbHBvZayqTJRhosFDD1ZVxbE6Cdw8sbbmvnUDVG.89tZi.Q54QzEcxxijPeC4CP 8e07Ce43OhnrpsY9zIN4LjlgH4P_GkwPuuylY6ewe424WWFRMH9esx61AEyIS3QJ.AD5UU8AMkEa aL2NK0u6FDsdPcestXrXUo.x6Z1gEB1NmCCb6k6K6tS36DpzD142D.90Ths0a6E5HiRdxUyATB39 JqHQCdKSYNm4AAJJu5qh3ouAFE6ojjSK5L1zZWGXbKF3lzarsgOwXkrcoDAkclLiz5TQMgIAtC5n IRW_Wr5Y0ImOYRqAC.MIpHNUquMQiHz4m6gokNf_dXk3GVNOK.RYtHnCXznFdJFDa.vDIIz3HUQz MaWYUJuXH3yTvf7eeTIFAQVQSrxJl4flHmSTPgbQaELiVNOgQujp3NXYxprcUmrMhC8aOZtLTu2m lfoAqu40HupjriwezXWZNQzAcKmLjYLCxfyYkIdch7MK5rfi7n3kXO4p7KN8xtbXf3f3HDvqGIag q10zl79LVUgfVPGwl1mz5d2ZuwHgyjcy8KP7A1QHel54hWxNoZZbUZ2nWeMMkwa9kTFAiao8Go4N BL7rCkjbJVtZ4ikBGP5t64LVyxA9Gsp1ujHLEw4wCr1Mqt.sU0C4WFe1qngb0A8j0Wuh4U5QAUjG u4DgJWrrvQBNyGPWCW.G59N7MH75lIHfF9kzFSqO7Yt.x2AqgygIANL6uPF0LHFLQy2cIcXXE1fM W3j9OiiHO2ry7Qsoh2S_3hPxDrh11bPO_KaGZP9eMb7lO1bC3TSKFYbl8ZfKA.bP6Q0OVQz8b1Cw YFPhGESAZUmiVYq6EoBe0lxp2qc0.S.rXAy_0BZLjhZLO3NbBJJ82dwuK4WMDtMxv6am3bH5XkW9 1ZmA9Icd8K3MqwwfOZOo1N91_jh.uidYNNsN8PX3UH9EL3XItawnb7hclgfJRpR.3uznGLXbCnfw uqgnXfvtxxH9Sk9rPeClqUfRZDiI76b9vChk- Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.gq1.yahoo.com with HTTP; Mon, 23 Dec 2019 05:41:52 +0000 Received: by smtp428.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 29ea8fb6574188c630099388ae7d0485; Mon, 23 Dec 2019 05:41:49 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) Subject: Long command lines messing up top's process list display: -r335850 related (in part)? Message-Id: Date: Sun, 22 Dec 2019 21:41:48 -0800 To: Eitan Adler , FreeBSD Current X-Mailer: Apple Mail (2.3608.40.2.2.4) References: X-Rspamd-Queue-Id: 47h7X22JfJz4GC8 X-Spamd-Bar: - X-Spamd-Result: default: False [-1.17 / 15.00]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; SUBJECT_ENDS_QUESTION(1.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.72)[-0.716,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.95)[-0.953,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (0.51), ipnet: 98.137.64.0/21(0.89), asn: 36647(0.71), country: US(-0.05)]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[146.68.137.98.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[146.68.137.98.rep.mailspike.net : 127.0.0.17]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Dec 2019 05:41:55 -0000 I've been looking into why I see top sometimes overwriting text across multiple lines when watching buildworld activity (for example). An example (from a 200 column, 70 lines display window) is: 21041 root 74 0 11M 2380K CPU27 27 0:01 41.60% sed = \nbj/amd6/ [TDW] / {\n.amd64/usr/s/:.* [TDW] / /\nmp/usr/bin/c++ w = /tmp/_symbol_.uQMlIJnU\nn-freebsd13.0 d\nit-ob}\ndisab/ U / {\ n0981 root s/:52 U / /\n 20M 6156K pipewr 2 0:00 15.02% nm = -go Analysis/AliasAnalysis.o Analysis/AliasAnalysisEvaluator.o = Analysis/AliasAnalysisSummary.o Analysis/AliasSetTracker.o Analysi 21037 root 52 0 11M 2512K piperd 1 0:00 0.21% tsort = -q 21036 root 52 0 12M 3240K wait 22 0:00 0.32% = /bin/sh - = /usr/obj/amd64_clang/amd64.amd64/usr/src/amd64.amd64/tmp/legacy/usr/sbin/l= order Analysis/AliasAnalysis.o Analysis/AliasAna (The lorder/tsort/nm/sed sequence and its sed line might not be the only such context. But it seems to be a primary example for buildworld context.) The example is more readable than they are sometimes but I think makes clear the issue. You can see where top updates only parts of a line, not expecting other text to have changed --yet they have changed. (Also: The context is ssh-terminal sessions over ethernet, not error prone serial-line based terminal sessions.) I end up forcing top to rewrite its display from scratch to get rid of accumulated stray text. (hh, toggling the type of display and back.) Looking around I ran into: QUOTE Revision 335850 - (view) (download) (annotate) - [select for diffs]=20 Modified Sun Jul 1 19:44:29 2018 UTC (17 months, 3 weeks ago) by eadler=20= File length: 41331 byte(s)=20 Diff to previous 335836 top(1): permit infinite length for command There isn't any need to limit the size of the screen. Utilities like 'less -S' don't have a (meaningful) limit anyways. This also makes the way to dynamically changing the column widths based on the screen width. END QUOTE and it seems to have removed what originally stopped the sbuf for a line from outputting too much text for the space available on the line: it previously accounted for the prior columns already put to use vs. screen_width in use at the time and used the count of what space was left. (Some later revisions are related but all after -r335850 looked like they did not deal with limiting to the space available after the other columns at any stage that I found. In essence I'm trying to ask based on where it looks like the issue might have started.) Was some other part of the code supposed to prevent lines that can not fit the space from overwriting other text=20 from other processes in the list? It seems to be overwriting in a way that top does not track and does put back the other line's own text? (Of course, I may just not have found what was to deal with such, I'm not a top expert.) A related issue for the overall problem is . . . I also ran into the removal of printable mixed with the use of: strvisx(dst, src, MIN(strlen(src), len), VIS_NL | VIS_CSTYLE | VIS_OCTAL | = VIS_SAFE); When I looked up VIS_SAFE, I found: QUOTE VIS_SAFE Only encode "unsafe" characters. Unsafe means control = char- acters which may cause common terminals to perform = unexpected functions. Currently this form allows space, tab, = newline, backspace, bell, and return -- in addition to all = graphic characters -- unencoded. END QUOTE For tab, for example, sent "unencoded": Might this lead the cursor being out of the expected place for whatever text is to follow? (VIS_TAB is not used. The VIS_NL seems to override VIS_SAFE for newlines.) But it looks to me like backspace, bell, and return sent "unencoded" would not end up with the cursor where top expects it to end up for figuring out what to do next for updating the display, likely resulting in a messed up display as well. This change is more recent than -r335850. I may not have found all contributing changes for the display not updating correctly. But those two are what I've noticed looking around as possible contributors. I will note that my context is not a good test for UTF-8 handling and the like, except as the case of looks like ASCII with: # locale LANG=3D LC_CTYPE=3D"C" LC_COLLATE=3D"C" LC_TIME=3D"C" LC_NUMERIC=3D"C" LC_MONETARY=3D"C" LC_MESSAGES=3D"C" LC_ALL=3D So the coverage by my activity is limited, and on the simpler side. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-current@freebsd.org Mon Dec 23 10:47:38 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 214271EC1E4 for ; Mon, 23 Dec 2019 10:47:38 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47hGJm191wz4VD9 for ; Mon, 23 Dec 2019 10:47:35 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Date: Mon, 23 Dec 2019 11:47:33 +0100 (CET) From: Ronald Klop To: freebsd-current@freebsd.org Message-ID: <1642119020.2.1577098053919@localhost> Subject: Giant locking MIME-Version: 1.0 X-Mailer: Realworks (488.1806.30cb13e2b7e) Importance: Normal X-Priority: 3 (Normal) X-Rspamd-Queue-Id: 47hGJm191wz4VD9 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of ronald-lists@klop.ws designates 194.109.157.24 as permitted sender) smtp.mailfrom=ronald-lists@klop.ws X-Spamd-Result: default: False [-1.81 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.990,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:194.109.157.0/24]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[klop.ws]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.99)[-0.994,0]; IP_SCORE(-0.03)[ipnet: 194.109.0.0/16(-0.16), asn: 3265(-0.02), country: NL(0.03)]; RCVD_IN_DNSWL_NONE(0.00)[24.157.109.194.list.dnswl.org : 127.0.15.0]; HAS_X_PRIO_THREE(0.00)[3]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL]; MIME_TRACE(0.00)[0:+,1:+,2:~] Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Dec 2019 10:47:38 -0000 sjakie kernel log messages: +FreeBSD 13.0-CURRENT #0 r355527M: Sun Dec 8 19:09:50 CET 2019 +CPU: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz (2400.12-MHz K8-class CPU) +avail memory = 5144903680 (4906 MB) +WARNING: Device "kbd" is Giant locked and may be deleted before FreeBSD 13.0. +WARNING: Device "psm" is Giant locked and may be deleted before FreeBSD 13.0. Haha, good luck removing those two. I thought Apple was quick deprecating old devices... Merry christmas, Ronald. From owner-freebsd-current@freebsd.org Thu Dec 26 13:15:01 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 37D9B1D0300; Thu, 26 Dec 2019 13:15:01 +0000 (UTC) (envelope-from lwhsu@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47k9RT0b8Jz3QBq; Thu, 26 Dec 2019 13:15:01 +0000 (UTC) (envelope-from lwhsu@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1129) id 0C64F137F7; Thu, 26 Dec 2019 13:15:01 +0000 (UTC) Date: Thu, 26 Dec 2019 13:15:01 +0000 From: Li-Wen Hsu To: freebsd-testing@freebsd.org Cc: freebsd-current@freebsd.org, freebsd-stable@freebsd.org Subject: FreeBSD CI Weekly Report 2019-12-22 Message-ID: <20191226131501.GA909@freefall.freebsd.org> Reply-To: freebsd-testing@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.11.4 (2019-03-13) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Dec 2019 13:15:01 -0000 (Please send the followup to freebsd-testing@ and note Reply-To is set.) FreeBSD CI Weekly Report 2019-12-22 =================================== Here is a summary of the FreeBSD Continuous Integration results for the period from 2019-12-15 to 2019-12-22. During this period, we have: * 2352 builds (98.5% (+2.2) passed, 1.5% (-2.2) failed) of buildworld and buildkernel (GENERIC and LINT) were executed on aarch64, amd64, armv6, armv7, i386, mips, mips64, powerpc, powerpc64, powerpcspe, riscv64, sparc64 architectures for head, stable/12, stable/11 branches. * 313 test runs (86.6% (-9.8) passed, 7.0% (+5.2) unstable, 6.4% (+4.6) exception) were executed on amd64, i386, riscv64 architectures for head, stable/12, stable/11 branches. * 16 doc builds (100% (+7) passed) Test case status (on 2019-12-22 23:59): | Branch/Architecture | Total | Pass | Fail | Skipped | | ------------------- | --------- | --------- | ----- | ------- | | head/amd64 | 7636 (+1) | 7570 (+4) | 0 (0) | 66 (-3) | | head/i386 | 7634 (+1) | 7560 (0) | 0 (0) | 74 (+1) | | 12-STABLE/amd64 | 7491 (+3) | 7443 (+3) | 0 (0) | 48 (0) | | 12-STABLE/i386 | 7489 (+3) | 7434 (+6) | 0 (0) | 55 (-3) | | 11-STABLE/amd64 | 6860 (+2) | 6810 (-1) | 0 (0) | 50 (+3) | | 11-STABLE/i386 | 6858 (+2) | 6809 (+2) | 0 (0) | 49 (0) | (The statistics from experimental jobs are omitted) If any of the issues found by CI are in your area of interest or expertise please investigate the PRs listed below. The latest web version of this report is available at https://hackmd.io/@FreeBSD-CI/report-20191222 and archive is available at https://hackmd.io/@FreeBSD-CI/ , any help is welcome. ## News * FreeBSD Foundation 2019 in Review: CI and Testing Advancements https://www.freebsdfoundation.org/blog/2019-in-review-ci-and-testing-advancements/ ## Failing and Flaky Tests (from experimental jobs) * https://ci.freebsd.org/job/FreeBSD-head-amd64-dtrace_test/ * cddl.usr.sbin.dtrace.common.misc.t_dtrace_contrib.tst_dynopt_d * https://bugs.freebsd.org/237641 * https://ci.freebsd.org/job/FreeBSD-head-amd64-test_zfs/ * There are ~13 failing and ~109 skipped cases, including flakey ones, see https://ci.freebsd.org/job/FreeBSD-head-amd64-test_zfs/lastCompletedBuild/testReport/ for more details * Work for cleaning these failing cass are in progress ## Disabled Tests * sys.fs.tmpfs.mount_test.large https://bugs.freebsd.org/212862 * sys.fs.tmpfs.link_test.kqueue https://bugs.freebsd.org/213662 * sys.kqueue.libkqueue.kqueue_test.main https://bugs.freebsd.org/233586 * sys.kern.ptrace_test.ptrace__PT_KILL_competing_stop https://bugs.freebsd.org/220841 * lib.libc.regex.exhaust_test.regcomp_too_big (i386 only) https://bugs.freebsd.org/237450 * sys.netinet.socket_afinet.socket_afinet_bind_zero https://bugs.freebsd.org/238781 * sys.netpfil.pf.names.names * sys.netpfil.pf.synproxy.synproxy https://bugs.freebsd.org/238870 * sys.kern.ptrace_test.ptrace__follow_fork_child_detached_unrelated_debugger https://bugs.freebsd.org/239292 * sys.kern.ptrace_test.ptrace__follow_fork_both_attached_unrelated_debugger https://bugs.freebsd.org/239397 * sys.kern.ptrace_test.ptrace__parent_sees_exit_after_child_debugger https://bugs.freebsd.org/239399 * sys.kern.ptrace_test.ptrace__follow_fork_parent_detached_unrelated_debugger https://bugs.freebsd.org/239425 * lib.libc.gen.getmntinfo_test.getmntinfo_test https://bugs.freebsd.org/240049 * sys.sys.qmath_test.qdivq_s64q https://bugs.freebsd.org/240219 * sys.kern.ptrace_test.ptrace__getppid https://bugs.freebsd.org/240510 * lib.libc.sys.stat_test.stat_socket https://bugs.freebsd.org/240621 * lib.libarchive.functional_test.test_write_filter_zstd https://bugs.freebsd.org/240683 * lib.libcasper.services.cap_dns.dns_test.main https://bugs.freebsd.org/241435 * local.kyua.* (31 cases) & local.lutok.* (3 cases) on 11-i386 https://ci.freebsd.org/job/FreeBSD-stable-11-i386-test/2278/testReport/ * sys.geom.class.multipath.failloop.failloop https://bugs.freebsd.org/242689 ## Issues ### Cause build fails * https://bugs.freebsd.org/233735 Possible build race: genoffset.o /usr/src/sys/sys/types.h: error: machine/endian.h: No such file or directory * https://bugs.freebsd.org/233769 Possible build race: ld: error: unable to find library -lgcc_s ### Cause kernel panics * https://bugs.freebsd.org/238870 sys.netpfil.pf.names.names and sys.netpfil.pf.synproxy.synproxy cause panic Patch exists: * https://reviews.freebsd.org/D20868 * https://reviews.freebsd.org/D20869 ### Open * https://bugs.freebsd.org/242689 sys.geom.class.multipath.failloop.failloop fails due to too many CTF entries * https://bugs.freebsd.org/237403 Tests in sys/opencrypto should be converted to Python3 * https://bugs.freebsd.org/237641 Flakey test case: common.misc.t_dtrace_contrib.tst_dynopt_d * https://bugs.freebsd.org/237656 "Freed UMA keg (rtentry) was not empty (18 items). Lost 1 pages of memory." seen when running sys/netipsec tests * https://bugs.freebsd.org/238781 sys.netinet.socket_afinet.socket_afinet_bind_zero does not work when mac_portacl(4) loaded * https://bugs.freebsd.org/239292 Flakey test case: sys.kern.ptrace_test.ptrace__follow_fork_child_detached_unrelated_debugger * https://bugs.freebsd.org/239397 Flakey test case: sys.kern.ptrace_test.ptrace__follow_fork_both_attached_unrelated_debugger * https://bugs.freebsd.org/239399 Flakey test case: sys.kern.ptrace_test.ptrace__parent_sees_exit_after_child_debugger * https://bugs.freebsd.org/239425 Flakey test case: sys.kern.ptrace_test.ptrace__follow_fork_parent_detached_unrelated_debugger * https://bugs.freebsd.org/241662 Flakey test case: lib.libarchive.functional_test.test_fuzz_iso9660 ### Others * [Tickets related to testing@](https://preview.tinyurl.com/y9maauwg) From owner-freebsd-current@freebsd.org Fri Dec 27 17:55:18 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CE3951CAAA9 for ; Fri, 27 Dec 2019 17:55:18 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 47kvcP224dz4N2d for ; Fri, 27 Dec 2019 17:55:17 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id xBRHtAIe060666 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Fri, 27 Dec 2019 09:55:10 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id xBRHtAJQ060665 for freebsd-current@freebsd.org; Fri, 27 Dec 2019 09:55:10 -0800 (PST) (envelope-from sgk) Date: Fri, 27 Dec 2019 09:55:10 -0800 From: Steve Kargl To: freebsd-current@freebsd.org Subject: [PATCH] primes(6) -- remove unnecessary code Message-ID: <20191227175458.GA60597@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 47kvcP224dz4N2d X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=washington.edu (policy=none); spf=none (mx1.freebsd.org: domain of sgk@troutmask.apl.washington.edu has no SPF policy when checking 128.95.76.21) smtp.mailfrom=sgk@troutmask.apl.washington.edu X-Spamd-Result: default: False [-2.23 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[sgk@troutmask.apl.washington.edu]; DMARC_POLICY_SOFTFAIL(0.10)[washington.edu : No valid SPF, No valid DKIM,none]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; IP_SCORE(-0.24)[ip: (0.05), ipnet: 128.95.0.0/16(-0.27), asn: 73(-0.92), country: US(-0.05)]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLYTO_ADDR_EQ_FROM(0.00)[]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2019 17:55:18 -0000 This patch removes an unnecessary check as the condition can never occur. Index: primes.c =================================================================== --- primes.c (revision 355983) +++ primes.c (working copy) @@ -129,7 +129,7 @@ switch (argc) { case 2: /* Start and stop supplied on the command line. */ - if (argv[0][0] == '-' || argv[1][0] == '-') + if (argv[1][0] == '-') errx(1, "negative numbers aren't permitted."); errno = 0; -- Steve From owner-freebsd-current@freebsd.org Fri Dec 27 18:07:52 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4BB231CB17F for ; Fri, 27 Dec 2019 18:07:52 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 47kvtv2gPwz4P4r for ; Fri, 27 Dec 2019 18:07:51 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id xBRI7nL4060738 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Fri, 27 Dec 2019 10:07:49 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id xBRI7nWw060737 for freebsd-current@freebsd.org; Fri, 27 Dec 2019 10:07:49 -0800 (PST) (envelope-from sgk) Date: Fri, 27 Dec 2019 10:07:49 -0800 From: Steve Kargl To: freebsd-current@freebsd.org Subject: Re: [PATCH] primes(6) -- remove unnecessary code Message-ID: <20191227180749.GA60730@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu References: <20191227175458.GA60597@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191227175458.GA60597@troutmask.apl.washington.edu> User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 47kvtv2gPwz4P4r X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=washington.edu (policy=none); spf=none (mx1.freebsd.org: domain of sgk@troutmask.apl.washington.edu has no SPF policy when checking 128.95.76.21) smtp.mailfrom=sgk@troutmask.apl.washington.edu X-Spamd-Result: default: False [-2.23 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[sgk@troutmask.apl.washington.edu]; DMARC_POLICY_SOFTFAIL(0.10)[washington.edu : No valid SPF, No valid DKIM,none]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; IP_SCORE(-0.24)[ip: (0.05), ipnet: 128.95.0.0/16(-0.27), asn: 73(-0.92), country: US(-0.05)]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLYTO_ADDR_EQ_FROM(0.00)[]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2019 18:07:52 -0000 On Fri, Dec 27, 2019 at 09:55:10AM -0800, Steve Kargl wrote: > This patch removes an unnecessary check as > the condition can never occur. > > Index: primes.c > =================================================================== > --- primes.c (revision 355983) > +++ primes.c (working copy) > @@ -129,7 +129,7 @@ > switch (argc) { > case 2: > /* Start and stop supplied on the command line. */ > - if (argv[0][0] == '-' || argv[1][0] == '-') > + if (argv[1][0] == '-') > errx(1, "negative numbers aren't permitted."); > > errno = 0; Hmm, I withdraw the patch. One can get a negative start value, but one would need to force that condition via a subversion via getopt. -- Steve From owner-freebsd-current@freebsd.org Fri Dec 27 20:36:45 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AA91F1CE87C for ; Fri, 27 Dec 2019 20:36:45 +0000 (UTC) (envelope-from jamie@catflap.org) Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [IPv6:2001:19f0:300:2185:123::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47kzBh1HCKz4XMB for ; Fri, 27 Dec 2019 20:36:43 +0000 (UTC) (envelope-from jamie@catflap.org) Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [104.207.135.49]) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5) with ESMTP id xBRKaZeO077901 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 27 Dec 2019 20:36:35 GMT (envelope-from jamie@donotpassgo.dyslexicfish.net) Received: (from jamie@localhost) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5/Submit) id xBRKaYBn077900; Fri, 27 Dec 2019 20:36:34 GMT (envelope-from jamie) From: Jamie Landeg-Jones Message-Id: <201912272036.xBRKaYBn077900@donotpassgo.dyslexicfish.net> Date: Fri, 27 Dec 2019 20:36:34 +0000 Organization: Dyslexic Fish To: sgk@troutmask.apl.washington.edu, freebsd-current@freebsd.org Subject: Re: [PATCH] primes(6) -- remove unnecessary code References: <20191227175458.GA60597@troutmask.apl.washington.edu> <20191227180749.GA60730@troutmask.apl.washington.edu> In-Reply-To: <20191227180749.GA60730@troutmask.apl.washington.edu> User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (donotpassgo.dyslexicfish.net [104.207.135.49]); Fri, 27 Dec 2019 20:36:35 +0000 (GMT) X-Rspamd-Queue-Id: 47kzBh1HCKz4XMB X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=catflap.org; spf=pass (mx1.freebsd.org: domain of jamie@catflap.org designates 2001:19f0:300:2185:123::1 as permitted sender) smtp.mailfrom=jamie@catflap.org X-Spamd-Result: default: False [-3.61 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx:dyslexicfish.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; HAS_ORG_HEADER(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[catflap.org,none]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:20473, ipnet:2001:19f0::/38, country:US]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(-0.81)[ipnet: 2001:19f0::/38(-2.62), asn: 20473(-1.36), country: US(-0.05)] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2019 20:36:45 -0000 Steve Kargl wrote: > Hmm, I withdraw the patch. One can get a negative start > value, but one would need to force that condition via > a subversion via getopt. Or: primes -- -1 5 From owner-freebsd-current@freebsd.org Fri Dec 27 20:53:35 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 90CE21CEFCB for ; Fri, 27 Dec 2019 20:53:35 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 47kzZ63853z4YBw for ; Fri, 27 Dec 2019 20:53:34 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id xBRKrDqQ061236 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 27 Dec 2019 12:53:14 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id xBRKrDsS061235; Fri, 27 Dec 2019 12:53:13 -0800 (PST) (envelope-from sgk) Date: Fri, 27 Dec 2019 12:53:13 -0800 From: Steve Kargl To: Jamie Landeg-Jones Cc: freebsd-current@freebsd.org Subject: Re: [PATCH] primes(6) -- remove unnecessary code Message-ID: <20191227205313.GA61230@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu References: <20191227175458.GA60597@troutmask.apl.washington.edu> <20191227180749.GA60730@troutmask.apl.washington.edu> <201912272036.xBRKaYBn077900@donotpassgo.dyslexicfish.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201912272036.xBRKaYBn077900@donotpassgo.dyslexicfish.net> User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 47kzZ63853z4YBw X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=washington.edu (policy=none); spf=none (mx1.freebsd.org: domain of sgk@troutmask.apl.washington.edu has no SPF policy when checking 128.95.76.21) smtp.mailfrom=sgk@troutmask.apl.washington.edu X-Spamd-Result: default: False [-2.23 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[sgk@troutmask.apl.washington.edu]; DMARC_POLICY_SOFTFAIL(0.10)[washington.edu : No valid SPF, No valid DKIM,none]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; IP_SCORE(-0.24)[ip: (0.05), ipnet: 128.95.0.0/16(-0.27), asn: 73(-0.92), country: US(-0.05)]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_ADDR_EQ_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2019 20:53:35 -0000 On Fri, Dec 27, 2019 at 08:36:34PM +0000, Jamie Landeg-Jones wrote: > Steve Kargl wrote: > > > Hmm, I withdraw the patch. One can get a negative start > > value, but one would need to force that condition via > > a subversion via getopt. > > Or: > > primes -- -1 5 Ah, yeah, that's what I wrote. -- Steve From owner-freebsd-current@freebsd.org Fri Dec 27 21:25:33 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1BB1E1CFEF4 for ; Fri, 27 Dec 2019 21:25:33 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 47l0H01x4jz4ZYP for ; Fri, 27 Dec 2019 21:25:31 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id xBRLPUdd061329 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Fri, 27 Dec 2019 13:25:30 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id xBRLPUVl061328 for freebsd-current@freebsd.org; Fri, 27 Dec 2019 13:25:30 -0800 (PST) (envelope-from sgk) Date: Fri, 27 Dec 2019 13:25:30 -0800 From: Steve Kargl To: freebsd-current@freebsd.org Subject: OpenSSL breaks factor(6) Message-ID: <20191227212530.GA61314@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 47l0H01x4jz4ZYP X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=washington.edu (policy=none); spf=none (mx1.freebsd.org: domain of sgk@troutmask.apl.washington.edu has no SPF policy when checking 128.95.76.21) smtp.mailfrom=sgk@troutmask.apl.washington.edu X-Spamd-Result: default: False [-2.23 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[sgk@troutmask.apl.washington.edu]; DMARC_POLICY_SOFTFAIL(0.10)[washington.edu : No valid SPF, No valid DKIM,none]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; IP_SCORE(-0.24)[ip: (0.05), ipnet: 128.95.0.0/16(-0.27), asn: 73(-0.92), country: US(-0.05)]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLYTO_ADDR_EQ_FROM(0.00)[]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2019 21:25:33 -0000 The use of OpenSSL in factor(6) breaks factor(6) with respect to its documentation. % man factor ... Numbers may be preceded by a single '+'. ... % factor +125 factor: +125: illegal numeric format. without OpenSSL one gets % factor +125 125: 5 5 5 Although undocumented, factor(6) seems to support hexidecimal input, but does it? % factor abc 2748: 2 2 3 229 % factor 1abc 1: 1 without OpenSSL one gets % factor abc 2748: 2 2 3 229 % factor 1abc 6844: 2 2 29 59 The above behavior with OpenSSL appears to match the following documentation: % man factor ... Numbers are terminated by a non-digit character (such as a newline). except without OpenSSL, factor(6) produces % factor 1abc 6844: 2 2 29 59 where 6844 is the decimal representation of 0x1abc. But, one now finds % factor 1abcp factor: 1abcp: illegal numeric format. so, factor(6) without OpenSSL does not terminate numbers with non-digit characters. -- Steve 20161221 https://www.youtube.com/watch?v=IbCHE-hONow From owner-freebsd-current@freebsd.org Fri Dec 27 21:47:20 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 575851D06E9 for ; Fri, 27 Dec 2019 21:47:20 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 47l0m727cFz4bm9 for ; Fri, 27 Dec 2019 21:47:18 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id xBRLlHv6061481 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Fri, 27 Dec 2019 13:47:17 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id xBRLlHr2061480 for freebsd-current@freebsd.org; Fri, 27 Dec 2019 13:47:17 -0800 (PST) (envelope-from sgk) Date: Fri, 27 Dec 2019 13:47:17 -0800 From: Steve Kargl To: freebsd-current@freebsd.org Subject: Re: OpenSSL breaks factor(6) Message-ID: <20191227214717.GA61475@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu References: <20191227212530.GA61314@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191227212530.GA61314@troutmask.apl.washington.edu> User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 47l0m727cFz4bm9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=washington.edu (policy=none); spf=none (mx1.freebsd.org: domain of sgk@troutmask.apl.washington.edu has no SPF policy when checking 128.95.76.21) smtp.mailfrom=sgk@troutmask.apl.washington.edu X-Spamd-Result: default: False [-2.23 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[sgk@troutmask.apl.washington.edu]; DMARC_POLICY_SOFTFAIL(0.10)[washington.edu : No valid SPF, No valid DKIM,none]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; IP_SCORE(-0.24)[ip: (0.05), ipnet: 128.95.0.0/16(-0.26), asn: 73(-0.92), country: US(-0.05)]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLYTO_ADDR_EQ_FROM(0.00)[]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2019 21:47:20 -0000 On Fri, Dec 27, 2019 at 01:25:30PM -0800, Steve Kargl wrote: > The use of OpenSSL in factor(6) breaks factor(6) with respect to > its documentation. > > % man factor > ... > Numbers may be preceded by a single '+'. > ... > > % factor +125 > factor: +125: illegal numeric format. > This fixes factor(6) for the above issue. The issue with hexadecimal is not easily fixed. Index: factor.c =================================================================== --- factor.c (revision 355983) +++ factor.c (working copy) @@ -148,21 +148,23 @@ for (p = buf; isblank(*p); ++p); if (*p == '\n' || *p == '\0') continue; + if (*p == '+') p++; if (*p == '-') errx(1, "negative numbers aren't permitted."); - if (BN_dec2bn(&val, buf) == 0 && - BN_hex2bn(&val, buf) == 0) - errx(1, "%s: illegal numeric format.", buf); + if (BN_dec2bn(&val, p) == 0 && + BN_hex2bn(&val, p) == 0) + errx(1, "%s: illegal numeric format.", p); pr_fact(val); } /* Factor the arguments. */ else - for (; *argv != NULL; ++argv) { - if (argv[0][0] == '-') + for (p = *argv; p != NULL; p = *++argv) { + if (*p == '-') errx(1, "negative numbers aren't permitted."); - if (BN_dec2bn(&val, argv[0]) == 0 && - BN_hex2bn(&val, argv[0]) == 0) - errx(1, "%s: illegal numeric format.", argv[0]); + if (*p == '+') p++; + if (BN_dec2bn(&val, p) == 0 && + BN_hex2bn(&val, p) == 0) + errx(1, "%s: illegal numeric format.", p); pr_fact(val); } exit(0); -- Steve From owner-freebsd-current@freebsd.org Fri Dec 27 22:42:16 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 787CE1D1B4A for ; Fri, 27 Dec 2019 22:42:16 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 47l1zW3sg3z4fQn for ; Fri, 27 Dec 2019 22:42:14 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id xBRMgCJt061680 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Fri, 27 Dec 2019 14:42:12 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id xBRMgCcv061679 for freebsd-current@freebsd.org; Fri, 27 Dec 2019 14:42:12 -0800 (PST) (envelope-from sgk) Date: Fri, 27 Dec 2019 14:42:12 -0800 From: Steve Kargl To: freebsd-current@freebsd.org Subject: Re: OpenSSL breaks factor(6) Message-ID: <20191227224212.GA61594@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu References: <20191227212530.GA61314@troutmask.apl.washington.edu> <20191227214717.GA61475@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191227214717.GA61475@troutmask.apl.washington.edu> User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 47l1zW3sg3z4fQn X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=washington.edu (policy=none); spf=none (mx1.freebsd.org: domain of sgk@troutmask.apl.washington.edu has no SPF policy when checking 128.95.76.21) smtp.mailfrom=sgk@troutmask.apl.washington.edu X-Spamd-Result: default: False [-2.23 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[sgk@troutmask.apl.washington.edu]; DMARC_POLICY_SOFTFAIL(0.10)[washington.edu : No valid SPF, No valid DKIM,none]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; IP_SCORE(-0.24)[ip: (0.05), ipnet: 128.95.0.0/16(-0.26), asn: 73(-0.92), country: US(-0.05)]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLYTO_ADDR_EQ_FROM(0.00)[]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2019 22:42:16 -0000 On Fri, Dec 27, 2019 at 01:47:17PM -0800, Steve Kargl wrote: > On Fri, Dec 27, 2019 at 01:25:30PM -0800, Steve Kargl wrote: > > The use of OpenSSL in factor(6) breaks factor(6) with respect to > > its documentation. > > > > % man factor > > ... > > Numbers may be preceded by a single '+'. > > ... > > > > % factor +125 > > factor: +125: illegal numeric format. > > > > This fixes factor(6) for the above issue. The issue with > hexadecimal is not easily fixed. > This patch now includes a fix for hexadecimal conversion. It simple scans the string for a hex digit in [a,...,f] and assumes that a hexadecimal string has been entered. A string that includes character from the decimal digits is assumed to by a decimal representation. Index: factor.c =================================================================== --- factor.c (revision 355983) +++ factor.c (working copy) @@ -71,6 +71,7 @@ #include #include #include +#include #include #include #include @@ -104,6 +105,7 @@ #endif +static bool is_hex(char *str); static void BN_print_dec_fp(FILE *, const BIGNUM *); static void pr_fact(BIGNUM *); /* print factors of a value */ @@ -148,21 +150,25 @@ for (p = buf; isblank(*p); ++p); if (*p == '\n' || *p == '\0') continue; + if (*p == '+') p++; if (*p == '-') errx(1, "negative numbers aren't permitted."); - if (BN_dec2bn(&val, buf) == 0 && - BN_hex2bn(&val, buf) == 0) - errx(1, "%s: illegal numeric format.", buf); + ch = is_hex(p) ? BN_hex2bn(&val, p) : + BN_dec2bn(&val, p); + if (ch == 0) + errx(1, "%s: illegal numeric format.", p); pr_fact(val); } /* Factor the arguments. */ else - for (; *argv != NULL; ++argv) { - if (argv[0][0] == '-') + for (p = *argv; p != NULL; p = *++argv) { + if (*p == '-') errx(1, "negative numbers aren't permitted."); - if (BN_dec2bn(&val, argv[0]) == 0 && - BN_hex2bn(&val, argv[0]) == 0) - errx(1, "%s: illegal numeric format.", argv[0]); + if (*p == '+') p++; + ch = is_hex(p) ? BN_hex2bn(&val, p) : + BN_dec2bn(&val, p); + if (ch == 0) + errx(1, "%s: illegal numeric format.", p); pr_fact(val); } exit(0); @@ -343,10 +349,9 @@ BN_dec2bn(BIGNUM **a, const char *str) { char *p; - errno = 0; **a = strtoul(str, &p, 10); - return (errno == 0 && (*p == '\n' || *p == '\0')); + return (errno == 0 ? 1 : 0); /* OpenSSL returns 0 on error! */ } static int @@ -356,7 +361,7 @@ errno = 0; **a = strtoul(str, &p, 16); - return (errno == 0 && (*p == '\n' || *p == '\0')); + return (errno == 0 ? 1 : 0); /* OpenSSL returns 0 on error! */ } static BN_ULONG @@ -370,3 +375,17 @@ } #endif + +/* Check if the string contains a hexadecimal digit. */ +static bool +is_hex(char *str) +{ + char c, *p; + for (p = str; *p; p++) { + c = tolower(*p); + if (c == 'a' || c == 'b' || c == 'c' || c == 'd' || + c == 'e' || c == 'f') + return true; + } + return false; +} -- Steve From owner-freebsd-current@freebsd.org Fri Dec 27 23:03:39 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3BB2C1D213D for ; Fri, 27 Dec 2019 23:03:39 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 47l2S93cKPz4gL5 for ; Fri, 27 Dec 2019 23:03:36 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id xBRN3Zwt061772 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Fri, 27 Dec 2019 15:03:35 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id xBRN3Zn6061771 for freebsd-current@freebsd.org; Fri, 27 Dec 2019 15:03:35 -0800 (PST) (envelope-from sgk) Date: Fri, 27 Dec 2019 15:03:35 -0800 From: Steve Kargl To: freebsd-current@freebsd.org Subject: Re: OpenSSL breaks factor(6) Message-ID: <20191227230335.GA61736@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu References: <20191227212530.GA61314@troutmask.apl.washington.edu> <20191227214717.GA61475@troutmask.apl.washington.edu> <20191227224212.GA61594@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191227224212.GA61594@troutmask.apl.washington.edu> User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 47l2S93cKPz4gL5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=washington.edu (policy=none); spf=none (mx1.freebsd.org: domain of sgk@troutmask.apl.washington.edu has no SPF policy when checking 128.95.76.21) smtp.mailfrom=sgk@troutmask.apl.washington.edu X-Spamd-Result: default: False [-2.23 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[sgk@troutmask.apl.washington.edu]; DMARC_POLICY_SOFTFAIL(0.10)[washington.edu : No valid SPF, No valid DKIM,none]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; IP_SCORE(-0.24)[ip: (0.05), ipnet: 128.95.0.0/16(-0.26), asn: 73(-0.91), country: US(-0.05)]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLYTO_ADDR_EQ_FROM(0.00)[]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2019 23:03:39 -0000 On Fri, Dec 27, 2019 at 02:42:12PM -0800, Steve Kargl wrote: > On Fri, Dec 27, 2019 at 01:47:17PM -0800, Steve Kargl wrote: > > On Fri, Dec 27, 2019 at 01:25:30PM -0800, Steve Kargl wrote: > > > The use of OpenSSL in factor(6) breaks factor(6) with respect to > > > its documentation. > > > > > > % man factor > > > ... > > > Numbers may be preceded by a single '+'. > > > ... > > > > > > % factor +125 > > > factor: +125: illegal numeric format. > > > > > > > This fixes factor(6) for the above issue. The issue with > > hexadecimal is not easily fixed. > > > > This patch now includes a fix for hexadecimal conversion. It > simple scans the string for a hex digit in [a,...,f] and assumes > that a hexadecimal string has been entered. A string that includes > character from the decimal digits is assumed to by a decimal > representation. Might as well fix the documentation. Acknowledges that factor(6) can deal with hexidecimal strings, and as a bonus fixes the bogus information about the maximum value considered by primes(6). Index: factor.6 =================================================================== --- factor.6 (revision 355983) +++ factor.6 (working copy) @@ -36,7 +36,7 @@ .\" .\" chongo /\oo/\ .\" -.Dd October 10, 2002 +.Dd December 27, 2019 .Dt FACTOR 6 .Os .Sh NAME @@ -67,11 +67,20 @@ .Nm is invoked with no arguments, .Nm -reads numbers, one per line, from standard input, until end of file or error. +reads numbers, one per line, from standard input, until end of file or 0 +is entered or an error occurs. Leading white-space and empty lines are ignored. Numbers may be preceded by a single .Ql + . Numbers are terminated by a non-digit character (such as a newline). +Numbers can be either decimal or hexadecimal strings. +If the string contains only decimal digits, it is treated as a +decimal representation for a number. +A hexadecimal string should not a +.Em 0x +or +.Em 0X +prefix. After a number is read, it is factored. .Pp The @@ -89,7 +98,7 @@ value must not be greater than the maximum. The default and maximum value of .Ar stop -is 3825123056546413050. +is 18446744073709551615. .Pp When the .Nm primes -- Steve From owner-freebsd-current@freebsd.org Sat Dec 28 03:00:10 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5CE831D7B84 for ; Sat, 28 Dec 2019 03:00:10 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47l7j50WJLz4rP5 for ; Sat, 28 Dec 2019 03:00:08 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id xBS304iR041044; Fri, 27 Dec 2019 19:00:04 -0800 (PST) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id xBS304bB041043; Fri, 27 Dec 2019 19:00:04 -0800 (PST) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201912280300.xBS304bB041043@gndrsh.dnsmgr.net> Subject: Re: OpenSSL breaks factor(6) In-Reply-To: <20191227224212.GA61594@troutmask.apl.washington.edu> To: sgk@troutmask.apl.washington.edu Date: Fri, 27 Dec 2019 19:00:04 -0800 (PST) CC: freebsd-current@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 47l7j50WJLz4rP5 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd-rwg@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd-rwg@gndrsh.dnsmgr.net X-Spamd-Result: default: False [-0.42 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.67)[-0.675,0]; FROM_HAS_DN(0.00)[]; IP_SCORE(0.04)[ip: (0.14), ipnet: 69.59.192.0/19(0.07), asn: 13868(0.02), country: US(-0.05)]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-0.68)[-0.684,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2019 03:00:10 -0000 > On Fri, Dec 27, 2019 at 01:47:17PM -0800, Steve Kargl wrote: > > On Fri, Dec 27, 2019 at 01:25:30PM -0800, Steve Kargl wrote: > > > The use of OpenSSL in factor(6) breaks factor(6) with respect to > > > its documentation. > > > > > > % man factor > > > ... > > > Numbers may be preceded by a single '+'. > > > ... > > > > > > % factor +125 > > > factor: +125: illegal numeric format. > > > > > > > This fixes factor(6) for the above issue. The issue with > > hexadecimal is not easily fixed. > > > > This patch now includes a fix for hexadecimal conversion. It > simple scans the string for a hex digit in [a,...,f] and assumes > that a hexadecimal string has been entered. A string that includes > character from the decimal digits is assumed to by a decimal > representation. It looks to me that the old code did the common method of try to convert as decimal, if that fails, try it as hex, if that fails report an error. Why is is that this common logic no longer works? > > Index: factor.c > =================================================================== > --- factor.c (revision 355983) > +++ factor.c (working copy) > @@ -71,6 +71,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -104,6 +105,7 @@ > > #endif > > +static bool is_hex(char *str); > static void BN_print_dec_fp(FILE *, const BIGNUM *); > > static void pr_fact(BIGNUM *); /* print factors of a value */ > @@ -148,21 +150,25 @@ > for (p = buf; isblank(*p); ++p); > if (*p == '\n' || *p == '\0') > continue; > + if (*p == '+') p++; > if (*p == '-') > errx(1, "negative numbers aren't permitted."); > - if (BN_dec2bn(&val, buf) == 0 && > - BN_hex2bn(&val, buf) == 0) Why does this logic fail? > - errx(1, "%s: illegal numeric format.", buf); > + ch = is_hex(p) ? BN_hex2bn(&val, p) : > + BN_dec2bn(&val, p); > + if (ch == 0) > + errx(1, "%s: illegal numeric format.", p); > pr_fact(val); > } > /* Factor the arguments. */ > else > - for (; *argv != NULL; ++argv) { > - if (argv[0][0] == '-') > + for (p = *argv; p != NULL; p = *++argv) { > + if (*p == '-') > errx(1, "negative numbers aren't permitted."); > - if (BN_dec2bn(&val, argv[0]) == 0 && > - BN_hex2bn(&val, argv[0]) == 0) > - errx(1, "%s: illegal numeric format.", argv[0]); > + if (*p == '+') p++; > + ch = is_hex(p) ? BN_hex2bn(&val, p) : > + BN_dec2bn(&val, p); > + if (ch == 0) > + errx(1, "%s: illegal numeric format.", p); > pr_fact(val); > } > exit(0); > @@ -343,10 +349,9 @@ > BN_dec2bn(BIGNUM **a, const char *str) > { > char *p; > - This blank line is part of style(9) > errno = 0; > **a = strtoul(str, &p, 10); > - return (errno == 0 && (*p == '\n' || *p == '\0')); > + return (errno == 0 ? 1 : 0); /* OpenSSL returns 0 on error! */ > } > > static int > @@ -356,7 +361,7 @@ > > errno = 0; > **a = strtoul(str, &p, 16); > - return (errno == 0 && (*p == '\n' || *p == '\0')); > + return (errno == 0 ? 1 : 0); /* OpenSSL returns 0 on error! */ > } > > static BN_ULONG > @@ -370,3 +375,17 @@ > } > > #endif > + > +/* Check if the string contains a hexadecimal digit. */ > +static bool > +is_hex(char *str) This function is poorly named as it does not check for all valid hex digits, only for alpha hex digits. It also only accepts lower case hex alpha, I would expect hex input to be case insensitive. is_hexalpha? > +{ > + char c, *p; > + for (p = str; *p; p++) { > + c = tolower(*p); > + if (c == 'a' || c == 'b' || c == 'c' || c == 'd' || > + c == 'e' || c == 'f') if ( c >= 'a' || c <= 'f') > + return true; > + } > + return false; > +} > > -- > Steve -- Rod Grimes rgrimes@freebsd.org From owner-freebsd-current@freebsd.org Sat Dec 28 03:02:14 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A3AF51D8081 for ; Sat, 28 Dec 2019 03:02:14 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47l7lT0vz7z4s5f for ; Sat, 28 Dec 2019 03:02:12 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id xBS32BFP041084; Fri, 27 Dec 2019 19:02:11 -0800 (PST) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id xBS32BaP041083; Fri, 27 Dec 2019 19:02:11 -0800 (PST) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201912280302.xBS32BaP041083@gndrsh.dnsmgr.net> Subject: Re: OpenSSL breaks factor(6) In-Reply-To: <20191227230335.GA61736@troutmask.apl.washington.edu> To: sgk@troutmask.apl.washington.edu Date: Fri, 27 Dec 2019 19:02:11 -0800 (PST) CC: freebsd-current@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 47l7lT0vz7z4s5f X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd-rwg@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd-rwg@gndrsh.dnsmgr.net X-Spamd-Result: default: False [-0.48 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.71)[-0.706,0]; FROM_HAS_DN(0.00)[]; IP_SCORE(0.04)[ip: (0.14), ipnet: 69.59.192.0/19(0.07), asn: 13868(0.02), country: US(-0.05)]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-0.71)[-0.708,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2019 03:02:14 -0000 > On Fri, Dec 27, 2019 at 02:42:12PM -0800, Steve Kargl wrote: > > On Fri, Dec 27, 2019 at 01:47:17PM -0800, Steve Kargl wrote: > > > On Fri, Dec 27, 2019 at 01:25:30PM -0800, Steve Kargl wrote: > > > > The use of OpenSSL in factor(6) breaks factor(6) with respect to > > > > its documentation. > > > > > > > > % man factor > > > > ... > > > > Numbers may be preceded by a single '+'. > > > > ... > > > > > > > > % factor +125 > > > > factor: +125: illegal numeric format. > > > > > > > > > > This fixes factor(6) for the above issue. The issue with > > > hexadecimal is not easily fixed. > > > > > > > This patch now includes a fix for hexadecimal conversion. It > > simple scans the string for a hex digit in [a,...,f] and assumes > > that a hexadecimal string has been entered. A string that includes > > character from the decimal digits is assumed to by a decimal > > representation. > > Might as well fix the documentation. Acknowledges that factor(6) > can deal with hexidecimal strings, and as a bonus fixes the bogus > information about the maximum value considered by primes(6). > > Index: factor.6 > =================================================================== > --- factor.6 (revision 355983) > +++ factor.6 (working copy) > @@ -36,7 +36,7 @@ > .\" > .\" chongo /\oo/\ > .\" > -.Dd October 10, 2002 > +.Dd December 27, 2019 > .Dt FACTOR 6 > .Os > .Sh NAME > @@ -67,11 +67,20 @@ > .Nm > is invoked with no arguments, > .Nm > -reads numbers, one per line, from standard input, until end of file or error. > +reads numbers, one per line, from standard input, until end of file or 0 > +is entered or an error occurs. > Leading white-space and empty lines are ignored. > Numbers may be preceded by a single > .Ql + . > Numbers are terminated by a non-digit character (such as a newline). > +Numbers can be either decimal or hexadecimal strings. > +If the string contains only decimal digits, it is treated as a > +decimal representation for a number. > +A hexadecimal string should not a ^contain? s/a/an/ > +.Em 0x > +or > +.Em 0X > +prefix. > After a number is read, it is factored. > .Pp > The > @@ -89,7 +98,7 @@ > value must not be greater than the maximum. > The default and maximum value of > .Ar stop > -is 3825123056546413050. > +is 18446744073709551615. > .Pp > When the > .Nm primes > > -- > Steve -- Rod Grimes rgrimes@freebsd.org From owner-freebsd-current@freebsd.org Sat Dec 28 03:52:01 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 45AC91D8D69 for ; Sat, 28 Dec 2019 03:52:01 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 47l8rt5JSlz4ttR for ; Sat, 28 Dec 2019 03:51:58 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id xBS3pt5w062440 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 27 Dec 2019 19:51:55 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id xBS3ptwZ062439; Fri, 27 Dec 2019 19:51:55 -0800 (PST) (envelope-from sgk) Date: Fri, 27 Dec 2019 19:51:55 -0800 From: Steve Kargl To: "Rodney W. Grimes" Cc: freebsd-current@freebsd.org Subject: Re: OpenSSL breaks factor(6) Message-ID: <20191228035155.GA62416@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu References: <20191227224212.GA61594@troutmask.apl.washington.edu> <201912280300.xBS304bB041043@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201912280300.xBS304bB041043@gndrsh.dnsmgr.net> User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 47l8rt5JSlz4ttR X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=washington.edu (policy=none); spf=none (mx1.freebsd.org: domain of sgk@troutmask.apl.washington.edu has no SPF policy when checking 128.95.76.21) smtp.mailfrom=sgk@troutmask.apl.washington.edu X-Spamd-Result: default: False [-2.23 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[sgk@troutmask.apl.washington.edu]; DMARC_POLICY_SOFTFAIL(0.10)[washington.edu : No valid SPF, No valid DKIM,none]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; IP_SCORE(-0.24)[ip: (0.05), ipnet: 128.95.0.0/16(-0.26), asn: 73(-0.91), country: US(-0.05)]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_ADDR_EQ_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2019 03:52:01 -0000 On Fri, Dec 27, 2019 at 07:00:04PM -0800, Rodney W. Grimes wrote: > > On Fri, Dec 27, 2019 at 01:47:17PM -0800, Steve Kargl wrote: > > > On Fri, Dec 27, 2019 at 01:25:30PM -0800, Steve Kargl wrote: > > > > The use of OpenSSL in factor(6) breaks factor(6) with respect to > > > > its documentation. > > > > > > > > % man factor > > > > ... > > > > Numbers may be preceded by a single '+'. > > > > ... > > > > > > > > % factor +125 > > > > factor: +125: illegal numeric format. > > > > > > > > > > This fixes factor(6) for the above issue. The issue with > > > hexadecimal is not easily fixed. > > > > > > > This patch now includes a fix for hexadecimal conversion. It > > simple scans the string for a hex digit in [a,...,f] and assumes > > that a hexadecimal string has been entered. A string that includes > > character from the decimal digits is assumed to by a decimal > > representation. > > It looks to me that the old code did the common method of > try to convert as decimal, if that fails, try it as hex, > if that fails report an error. > > Why is is that this common logic no longer works? AFAICT, BN_dec2bn and BN_hex2bn from OpenSSL scan from left to right, does a conversion with what is possible, and reports success. That is, for 1abc, BN_dec2bn can convert 1 to 1 and reports success. The local implementations of these functions, when OpenSSL is not used, does not do this partial conversion. > > > > Index: factor.c > > =================================================================== > > --- factor.c (revision 355983) > > +++ factor.c (working copy) > > @@ -71,6 +71,7 @@ > > #include > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -104,6 +105,7 @@ > > > > #endif > > > > +static bool is_hex(char *str); > > static void BN_print_dec_fp(FILE *, const BIGNUM *); > > > > static void pr_fact(BIGNUM *); /* print factors of a value */ > > @@ -148,21 +150,25 @@ > > for (p = buf; isblank(*p); ++p); > > if (*p == '\n' || *p == '\0') > > continue; > > + if (*p == '+') p++; > > if (*p == '-') > > errx(1, "negative numbers aren't permitted."); > > - if (BN_dec2bn(&val, buf) == 0 && > > - BN_hex2bn(&val, buf) == 0) > > Why does this logic fail? See BN_hex2bn manpage. C/C++ does shortcircuits. With 1abc, BN_dec2bn converts the string to 1, puts it in val, and returns nonzero. BN_hex2bn is never called. Flipping the conditionals, of course, doesn't work because 0-9 are digits in the hexadecimal set (e.g., 111 is a valid hex and decimal string). > > - errx(1, "%s: illegal numeric format.", buf); > > + ch = is_hex(p) ? BN_hex2bn(&val, p) : > > + BN_dec2bn(&val, p); > > + if (ch == 0) > > + errx(1, "%s: illegal numeric format.", p); > > pr_fact(val); > > } > > /* Factor the arguments. */ > > else > > - for (; *argv != NULL; ++argv) { > > - if (argv[0][0] == '-') > > + for (p = *argv; p != NULL; p = *++argv) { > > + if (*p == '-') > > errx(1, "negative numbers aren't permitted."); > > - if (BN_dec2bn(&val, argv[0]) == 0 && > > - BN_hex2bn(&val, argv[0]) == 0) > > - errx(1, "%s: illegal numeric format.", argv[0]); > > + if (*p == '+') p++; > > + ch = is_hex(p) ? BN_hex2bn(&val, p) : > > + BN_dec2bn(&val, p); > > + if (ch == 0) > > + errx(1, "%s: illegal numeric format.", p); > > pr_fact(val); > > } > > exit(0); > > @@ -343,10 +349,9 @@ > > BN_dec2bn(BIGNUM **a, const char *str) > > { > > char *p; > > - > This blank line is part of style(9) > Whoops. Haven't had to worry about style(9) in a long time. > > errno = 0; > > **a = strtoul(str, &p, 10); > > - return (errno == 0 && (*p == '\n' || *p == '\0')); > > + return (errno == 0 ? 1 : 0); /* OpenSSL returns 0 on error! */ > > } > > > > static int > > @@ -356,7 +361,7 @@ > > > > errno = 0; > > **a = strtoul(str, &p, 16); > > - return (errno == 0 && (*p == '\n' || *p == '\0')); > > + return (errno == 0 ? 1 : 0); /* OpenSSL returns 0 on error! */ > > } > > > > static BN_ULONG > > @@ -370,3 +375,17 @@ > > } > > > > #endif > > + > > +/* Check if the string contains a hexadecimal digit. */ > > +static bool > > +is_hex(char *str) > This function is poorly named as it does not check for > all valid hex digits, only for alpha hex digits. It > also only accepts lower case hex alpha, I would expect > hex input to be case insensitive. > > is_hexalpha? Feel free to rename it and improve. > > > +{ > > + char c, *p; > > + for (p = str; *p; p++) { > > + c = tolower(*p); > > + if (c == 'a' || c == 'b' || c == 'c' || c == 'd' || > > + c == 'e' || c == 'f') > if ( c >= 'a' || c <= 'f') > > > + return true; > > + } > > + return false; > > +} > > > > -- > > Steve > > -- > Rod Grimes rgrimes@freebsd.org -- Steve 20170425 https://www.youtube.com/watch?v=VWUpyCsUKR4 20161221 https://www.youtube.com/watch?v=IbCHE-hONow From owner-freebsd-current@freebsd.org Sat Dec 28 04:42:57 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 752781D9E83 for ; Sat, 28 Dec 2019 04:42:57 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47l9zg6ZsGz3D4h for ; Sat, 28 Dec 2019 04:42:55 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id xBS4grM1041519; Fri, 27 Dec 2019 20:42:53 -0800 (PST) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id xBS4grnp041518; Fri, 27 Dec 2019 20:42:53 -0800 (PST) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201912280442.xBS4grnp041518@gndrsh.dnsmgr.net> Subject: Re: OpenSSL breaks factor(6) In-Reply-To: <20191228035155.GA62416@troutmask.apl.washington.edu> To: sgk@troutmask.apl.washington.edu Date: Fri, 27 Dec 2019 20:42:53 -0800 (PST) CC: "Rodney W. Grimes" , freebsd-current@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 47l9zg6ZsGz3D4h X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd-rwg@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd-rwg@gndrsh.dnsmgr.net X-Spamd-Result: default: False [-0.49 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.76)[-0.762,0]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-0.66)[-0.661,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.04)[ip: (0.14), ipnet: 69.59.192.0/19(0.07), asn: 13868(0.02), country: US(-0.05)]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2019 04:42:57 -0000 > On Fri, Dec 27, 2019 at 07:00:04PM -0800, Rodney W. Grimes wrote: > > > On Fri, Dec 27, 2019 at 01:47:17PM -0800, Steve Kargl wrote: > > > > On Fri, Dec 27, 2019 at 01:25:30PM -0800, Steve Kargl wrote: > > > > > The use of OpenSSL in factor(6) breaks factor(6) with respect to > > > > > its documentation. > > > > > > > > > > % man factor > > > > > ... > > > > > Numbers may be preceded by a single '+'. > > > > > ... > > > > > > > > > > % factor +125 > > > > > factor: +125: illegal numeric format. > > > > > > > > > > > > > This fixes factor(6) for the above issue. The issue with > > > > hexadecimal is not easily fixed. > > > > > > > > > > This patch now includes a fix for hexadecimal conversion. It > > > simple scans the string for a hex digit in [a,...,f] and assumes > > > that a hexadecimal string has been entered. A string that includes > > > character from the decimal digits is assumed to by a decimal > > > representation. > > > > It looks to me that the old code did the common method of > > try to convert as decimal, if that fails, try it as hex, > > if that fails report an error. > > > > Why is is that this common logic no longer works? > > AFAICT, BN_dec2bn and BN_hex2bn from OpenSSL scan from left > to right, does a conversion with what is possible, and reports > success. That is, for 1abc, BN_dec2bn can convert 1 to 1 and > reports success. The local implementations of these functions, > when OpenSSL is not used, does not do this partial conversion. I think I see now, the local implementaton checks for whole string conversion with a test for newline or null as the last byte converted by strtoul, the OpenSSL does not do this. So why ever use the, um, IMHO broken for this application, SSL versions of these functions? Or if we do need to use them for some reason apply the whole string conversion checks as wrappers around them? > > > > > > Index: factor.c > > > =================================================================== > > > --- factor.c (revision 355983) > > > +++ factor.c (working copy) > > > @@ -71,6 +71,7 @@ > > > #include > > > #include > > > #include > > > +#include > > > #include > > > #include > > > #include > > > @@ -104,6 +105,7 @@ > > > > > > #endif > > > > > > +static bool is_hex(char *str); > > > static void BN_print_dec_fp(FILE *, const BIGNUM *); > > > > > > static void pr_fact(BIGNUM *); /* print factors of a value */ > > > @@ -148,21 +150,25 @@ > > > for (p = buf; isblank(*p); ++p); > > > if (*p == '\n' || *p == '\0') > > > continue; > > > + if (*p == '+') p++; > > > if (*p == '-') > > > errx(1, "negative numbers aren't permitted."); > > > - if (BN_dec2bn(&val, buf) == 0 && > > > - BN_hex2bn(&val, buf) == 0) > > > > Why does this logic fail? > > See BN_hex2bn manpage. C/C++ does shortcircuits. With 1abc, > BN_dec2bn converts the string to 1, puts it in val, and returns > nonzero. BN_hex2bn is never called. Flipping the conditionals, > of course, doesn't work because 0-9 are digits in the hexadecimal > set (e.g., 111 is a valid hex and decimal string). > > > > - errx(1, "%s: illegal numeric format.", buf); > > > + ch = is_hex(p) ? BN_hex2bn(&val, p) : > > > + BN_dec2bn(&val, p); > > > + if (ch == 0) > > > + errx(1, "%s: illegal numeric format.", p); > > > pr_fact(val); > > > } > > > /* Factor the arguments. */ > > > else > > > - for (; *argv != NULL; ++argv) { > > > - if (argv[0][0] == '-') > > > + for (p = *argv; p != NULL; p = *++argv) { > > > + if (*p == '-') > > > errx(1, "negative numbers aren't permitted."); > > > - if (BN_dec2bn(&val, argv[0]) == 0 && > > > - BN_hex2bn(&val, argv[0]) == 0) > > > - errx(1, "%s: illegal numeric format.", argv[0]); > > > + if (*p == '+') p++; > > > + ch = is_hex(p) ? BN_hex2bn(&val, p) : > > > + BN_dec2bn(&val, p); > > > + if (ch == 0) > > > + errx(1, "%s: illegal numeric format.", p); > > > pr_fact(val); > > > } > > > exit(0); > > > @@ -343,10 +349,9 @@ > > > BN_dec2bn(BIGNUM **a, const char *str) > > > { > > > char *p; > > > - > > This blank line is part of style(9) > > > > Whoops. Haven't had to worry about style(9) in a long time. > > > > errno = 0; > > > **a = strtoul(str, &p, 10); > > > - return (errno == 0 && (*p == '\n' || *p == '\0')); > > > + return (errno == 0 ? 1 : 0); /* OpenSSL returns 0 on error! */ > > > } > > > > > > static int > > > @@ -356,7 +361,7 @@ > > > > > > errno = 0; > > > **a = strtoul(str, &p, 16); > > > - return (errno == 0 && (*p == '\n' || *p == '\0')); > > > + return (errno == 0 ? 1 : 0); /* OpenSSL returns 0 on error! */ > > > } > > > > > > static BN_ULONG > > > @@ -370,3 +375,17 @@ > > > } > > > > > > #endif > > > + > > > +/* Check if the string contains a hexadecimal digit. */ > > > +static bool > > > +is_hex(char *str) > > This function is poorly named as it does not check for > > all valid hex digits, only for alpha hex digits. It > > also only accepts lower case hex alpha, I would expect > > hex input to be case insensitive. > > > > is_hexalpha? > > Feel free to rename it and improve. > > > > > > +{ > > > + char c, *p; > > > + for (p = str; *p; p++) { > > > + c = tolower(*p); > > > + if (c == 'a' || c == 'b' || c == 'c' || c == 'd' || > > > + c == 'e' || c == 'f') > > if ( c >= 'a' || c <= 'f') > > > > > + return true; > > > + } > > > + return false; > > > +} > > > > > > -- > > > Steve > > > > -- > > Rod Grimes rgrimes@freebsd.org > > -- > Steve > 20170425 https://www.youtube.com/watch?v=VWUpyCsUKR4 > 20161221 https://www.youtube.com/watch?v=IbCHE-hONow > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > -- Rod Grimes rgrimes@freebsd.org From owner-freebsd-current@freebsd.org Sat Dec 28 05:15:37 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 986A71DAD91 for ; Sat, 28 Dec 2019 05:15:37 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 47lBjM66HBz3FRS for ; Sat, 28 Dec 2019 05:15:35 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id xBS5FX6H062641 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 27 Dec 2019 21:15:33 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id xBS5FXNY062640; Fri, 27 Dec 2019 21:15:33 -0800 (PST) (envelope-from sgk) Date: Fri, 27 Dec 2019 21:15:33 -0800 From: Steve Kargl To: "Rodney W. Grimes" Cc: freebsd-current@freebsd.org Subject: Re: OpenSSL breaks factor(6) Message-ID: <20191228051533.GA62606@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu References: <20191228035155.GA62416@troutmask.apl.washington.edu> <201912280442.xBS4grnp041518@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201912280442.xBS4grnp041518@gndrsh.dnsmgr.net> User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 47lBjM66HBz3FRS X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=washington.edu (policy=none); spf=none (mx1.freebsd.org: domain of sgk@troutmask.apl.washington.edu has no SPF policy when checking 128.95.76.21) smtp.mailfrom=sgk@troutmask.apl.washington.edu X-Spamd-Result: default: False [-2.23 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[sgk@troutmask.apl.washington.edu]; DMARC_POLICY_SOFTFAIL(0.10)[washington.edu : No valid SPF, No valid DKIM,none]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; IP_SCORE(-0.23)[ip: (0.05), ipnet: 128.95.0.0/16(-0.26), asn: 73(-0.91), country: US(-0.05)]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_ADDR_EQ_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2019 05:15:37 -0000 On Fri, Dec 27, 2019 at 08:42:53PM -0800, Rodney W. Grimes wrote: > > On Fri, Dec 27, 2019 at 07:00:04PM -0800, Rodney W. Grimes wrote: > > > > On Fri, Dec 27, 2019 at 01:47:17PM -0800, Steve Kargl wrote: > > > > > > > > This patch now includes a fix for hexadecimal conversion. It > > > > simple scans the string for a hex digit in [a,...,f] and assumes > > > > that a hexadecimal string has been entered. A string that includes > > > > character from the decimal digits is assumed to by a decimal > > > > representation. > > > > > > It looks to me that the old code did the common method of > > > try to convert as decimal, if that fails, try it as hex, > > > if that fails report an error. > > > > > > Why is is that this common logic no longer works? > > > > AFAICT, BN_dec2bn and BN_hex2bn from OpenSSL scan from left > > to right, does a conversion with what is possible, and reports > > success. That is, for 1abc, BN_dec2bn can convert 1 to 1 and > > reports success. The local implementations of these functions, > > when OpenSSL is not used, does not do this partial conversion. > > I think I see now, the local implementaton checks for whole > string conversion with a test for newline or null as the last > byte converted by strtoul, the OpenSSL does not do this. > My patch fixes that. The manpage documents that '1abcp' should convert '1abc'. The 'p' simply terminates the conversion. The local implementations actually flags an error. I suspect the logic never worked as intended. The use of OpenSSL functions in factor(6) was introduced in r104722 by fanf@. > So why ever use the, um, IMHO broken for this application, > SSL versions of these functions? Or if we do need to use > them for some reason apply the whole string conversion > checks as wrappers around them? You'll need to ask fanf@, but I suspect the SSL version was introduced to allow the factoring of integers that exceed (uint64_t)(-1). -- Steve From owner-freebsd-current@freebsd.org Sat Dec 28 05:59:57 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 599B21DC18B for ; Sat, 28 Dec 2019 05:59:57 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic317-22.consmr.mail.gq1.yahoo.com (sonic317-22.consmr.mail.gq1.yahoo.com [98.137.66.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47lChX2S2Pz3Hbl for ; Sat, 28 Dec 2019 05:59:55 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: .MfLf2cVM1m_PPwTZGTzH2sVeykiagPnhV9nU4B25yLE0k3Nakqs6up54RnkdHW .wxWBTTrK285b7pU5f_A24umRJv4Qx3UkjA7D1O77kEYssolRz5j2589HQ7ordS2fFqUMYXdg76t wxoiKPVUzAe8bJ8jCBerMKQf3l0pcD.pAkDVXEh71qXPybR.YbZrsfc5fPSqq2C0fTaF8LiTB.i. 1Jx_OMUmBn3nS2SUfQOE.WCu70bHgpbX3RzqU420iRrtzIv6OqlhPrlKSrLji1yeazxO9CCkZngd C3T0vq.uCkbMnByq1crBoLA6P1hU7bSrlifrPGjHLWLNWZFEQS.1zQvIrp1PX7lyDJ61JxHGVi6e TpyLYeYHa_vUagITj3lVxmkDdzPhSkII0nPYATf78fJ7U4hsDDLXi8fnaf23wfpO8eTlm8ewMIxP 0Tl8orazv7KxNPxr7T5d1afXDlzuM4_6ywsEzRsXLAQDOwWDCIS_zH9zv761FmPXX0C9kGlwoQWI ZWsP3XAhT2hP9tc5K6BkXUFyfKKNMyrIFsWbvCXlp9r07KRzk8NAFcHJzsAnm4gFcCo8_1NXv8Pg a45JofkzQlBf7qYv44hHeoaHbgR0CFlgKHPz3EpdYfwsi.VahzfN1aIdUjVyAdJdbUau6aDtwGVt HegXQFQsoITn3aeKsbQPUq6zS6FRxCoEqM7eTzfct6E6ZPkNlYkWwySWYlUeyIH9RaiId5Ihni8a EfXIDmkVL7gwBYhZgJgd7fYj1DphbpfHaxuZYv7NSEVLZvhSx2oh7BuoyiFuK7TA8KzWz0n2hkeF 2HSby9RclI27gu_qKz827QfLyG9EBbnRZ5tra38WCK8zyNHOI0usoBX6gu6cUNN2g6Rh_rbmyAOX 0_0E6Zn8Im0rJFIBfBfUOceIXhg7UfMyFIT4rFBmuWhmx_fzcuk8duoe9TIhNUlgv9OUiAfG9lvQ cjRxD_6dkWWlIEj9am_nzy89Gp5vXvcF6MUdgrObd1RgxDkzb6cFppt1dIA9reUUeAU.Yo1V4PAt UlUNO9NFsJauXgaCkRe0A3dtkoW_v.qeVoD2seVtciN6fVY4G2W7btN2BW8qJyDwtw28aijjI3GD 6qefSrfIsCfdfQJQstfd0VdHbxTg9EDW5eWHfXOUxqA3UjOzd7Olb8yUX1wX6BLOOdg0VHUNWKcA OZgq90QktGXjU3UrSHOSircQSKQSomN.Gdprl.cSoFm3f3hYxUGEctTxPVUOq4NVbqXrWxKzse0E Vo.IsLM4epUQeWUPvjUqrkFw3jFrvn2d20rRMMTjg6i5AU4G9FImWNiYxbVitX8PvCAICfA..Scf YlupuuW39HeouC2x25tiDonud3PEOU41zJT__z9cz0xovdosX3IYeHJokk30J6BpNVvMnSz32BQE qysojJ.nHO3HHOgNb7dL.voNZ8d4I1Pai5ZtnzX4- Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.gq1.yahoo.com with HTTP; Sat, 28 Dec 2019 05:59:54 +0000 Received: by smtp410.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 5727daf17009ee2142fefff3f58f77f2; Sat, 28 Dec 2019 05:59:49 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) Subject: head -r356066 reaching kern.ipc.nmbclusters on Rock64 (CortexA53 with 4GiByte of RAM) while putting files on it via nfs: some evidence Message-Id: <65659DD9-335A-40C7-A6DE-B71019BCD6E6@yahoo.com> Date: Fri, 27 Dec 2019 21:59:49 -0800 Cc: FreeBSD Current To: freebsd-arm X-Mailer: Apple Mail (2.3608.40.2.2.4) References: <65659DD9-335A-40C7-A6DE-B71019BCD6E6.ref@yahoo.com> X-Rspamd-Queue-Id: 47lChX2S2Pz3Hbl X-Spamd-Bar: - X-Spamd-Result: default: False [-1.71 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.45)[-0.452,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MIME_GOOD(-0.10)[text/plain]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-0.76)[-0.761,0]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[148.66.137.98.list.dnswl.org : 127.0.5.0]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.00)[ip: (6.67), ipnet: 98.137.64.0/21(0.89), asn: 36647(0.71), country: US(-0.05)]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2019 05:59:57 -0000 The following sort of sequence leads to the Rock64 not responding on the console or over ethernet, after notifying of nmbclusters having been reached. (This limits what information I have of what things were like at the end.) This is for a head -r356066 based non-debug-build context. The sequence leading to the hangup was: # mount -onoatime,hard,intr 192.168.1.???:/ /mnt # tar -cf /mnt/usr/obj/clang-cortexA53-installkernel.tar -C = /usr/obj/DESTDIRs/clang-cortexA53-installkernel/ . # tar -cf /mnt/usr/obj/clang-cortexA53-installworld.tar -C = /usr/obj/DESTDIRs/clang-cortexA53-installworld/ . # tar -cf /mnt/usr/obj/clang-cortexA53-installworld-poud.tar -C = /usr/obj/DESTDIRs/clang-cortexA53-installworld-poud/ . (Hung up during this last one, after reporting on the console that it had reached kern.ipc.nmbclusters.) cp -aRx of directory trees copied to such a mount and the like also lead to such. I've not seen such an issue on the Cortex-A7 (armv7, 2 GiByte), CortexA57 (aarch64, 8 GiByte), CortexA72 (aarch64, 16 GiBYte), or powerpc64 (16 GiByte) contexts I've done similarly with. For reference, after power-off/power-on and retrying just the last tar, which worked, shows what I report below. Before showing the more complete list of sysctl -a output that mentions "cluster", here are large valued items compared to the other example contexts I've been using: . . . vm.uma.mbuf_cluster.stats.frees: 557 vm.uma.mbuf_cluster.stats.allocs: 63807 vm.uma.mbuf_cluster.stats.current: 63250 . . . vm.uma.mbuf_cluster.limit.items: 63739 . . . vm.uma.mbuf_cluster.keg.pages: 31870 . . . # sysctl -a | grep clust kern.ipc.nmbclusters: 84351 kern.geom.raid.raid1e.rebuild_cluster_idle: 100 kern.geom.raid.raid1.rebuild_cluster_idle: 100 vm.cluster_anon: 1 vm.uma.mbuf_cluster.stats.xdomain: 0 vm.uma.mbuf_cluster.stats.fails: 0 vm.uma.mbuf_cluster.stats.frees: 557 vm.uma.mbuf_cluster.stats.allocs: 63807 vm.uma.mbuf_cluster.stats.current: 63250 vm.uma.mbuf_cluster.domain.0.wss: 1 vm.uma.mbuf_cluster.domain.0.imin: 0 vm.uma.mbuf_cluster.domain.0.imax: 0 vm.uma.mbuf_cluster.domain.0.nitems: 0 vm.uma.mbuf_cluster.limit.sleeps: 0 vm.uma.mbuf_cluster.limit.sleepers: 0 vm.uma.mbuf_cluster.limit.max_items: 84351 vm.uma.mbuf_cluster.limit.items: 63739 vm.uma.mbuf_cluster.keg.efficiency: 98 vm.uma.mbuf_cluster.keg.free: 1 vm.uma.mbuf_cluster.keg.pages: 31870 vm.uma.mbuf_cluster.keg.align: 7 vm.uma.mbuf_cluster.keg.ipers: 2 vm.uma.mbuf_cluster.keg.ppera: 1 vm.uma.mbuf_cluster.keg.rsize: 2048 vm.uma.mbuf_cluster.keg.name: mbuf_cluster vm.uma.mbuf_cluster.bucket_size_max: 253 vm.uma.mbuf_cluster.bucket_size: 251 vm.uma.mbuf_cluster.flags: 0x2008 vm.uma.mbuf_cluster.size: 2048 vm.phys_pager_cluster: 1024 vfs.ffs.maxclustersearch: 10 Here are figures for a couple of the other contexts, after their tars-via-nfs: =46rom the Cortex-A7 (armv7, 2GiByte) context: # sysctl -a | grep cluster kern.ipc.nmbclusters: 26086 vm.cluster_anon: 1 vm.uma.mbuf_cluster.stats.xdomain: 0 vm.uma.mbuf_cluster.stats.fails: 0 vm.uma.mbuf_cluster.stats.frees: 1689 vm.uma.mbuf_cluster.stats.allocs: 4472 vm.uma.mbuf_cluster.stats.current: 2783 vm.uma.mbuf_cluster.domain.0.wss: 0 vm.uma.mbuf_cluster.domain.0.imin: 125 vm.uma.mbuf_cluster.domain.0.imax: 125 vm.uma.mbuf_cluster.domain.0.nitems: 125 vm.uma.mbuf_cluster.limit.sleeps: 0 vm.uma.mbuf_cluster.limit.sleepers: 0 vm.uma.mbuf_cluster.limit.max_items: 26086 vm.uma.mbuf_cluster.limit.items: 3539 vm.uma.mbuf_cluster.keg.efficiency: 98 vm.uma.mbuf_cluster.keg.free: 41 vm.uma.mbuf_cluster.keg.pages: 1790 vm.uma.mbuf_cluster.keg.align: 3 vm.uma.mbuf_cluster.keg.ipers: 2 vm.uma.mbuf_cluster.keg.ppera: 1 vm.uma.mbuf_cluster.keg.rsize: 2048 vm.uma.mbuf_cluster.keg.name: mbuf_cluster vm.uma.mbuf_cluster.bucket_size_max: 253 vm.uma.mbuf_cluster.bucket_size: 103 vm.uma.mbuf_cluster.flags: 0x2008 vm.uma.mbuf_cluster.size: 2048 vm.phys_pager_cluster: 1024 vfs.ffs.maxclustersearch: 10 The Cortext-A57 (aarch64, 8 GiByte) context: # sysctl -a | grep clust kern.ipc.nmbclusters: 168310 kern.geom.raid.raid1e.rebuild_cluster_idle: 100 kern.geom.raid.raid1.rebuild_cluster_idle: 100 vm.cluster_anon: 1 vm.uma.mbuf_cluster.stats.xdomain: 0 vm.uma.mbuf_cluster.stats.fails: 0 vm.uma.mbuf_cluster.stats.frees: 8678 vm.uma.mbuf_cluster.stats.allocs: 10702 vm.uma.mbuf_cluster.stats.current: 2024 vm.uma.mbuf_cluster.domain.0.wss: 0 vm.uma.mbuf_cluster.domain.0.imin: 25 vm.uma.mbuf_cluster.domain.0.imax: 25 vm.uma.mbuf_cluster.domain.0.nitems: 25 vm.uma.mbuf_cluster.limit.sleeps: 0 vm.uma.mbuf_cluster.limit.sleepers: 0 vm.uma.mbuf_cluster.limit.max_items: 168310 vm.uma.mbuf_cluster.limit.items: 2069 vm.uma.mbuf_cluster.keg.efficiency: 98 vm.uma.mbuf_cluster.keg.free: 1 vm.uma.mbuf_cluster.keg.pages: 1035 vm.uma.mbuf_cluster.keg.align: 7 vm.uma.mbuf_cluster.keg.ipers: 2 vm.uma.mbuf_cluster.keg.ppera: 1 vm.uma.mbuf_cluster.keg.rsize: 2048 vm.uma.mbuf_cluster.keg.name: mbuf_cluster vm.uma.mbuf_cluster.bucket_size_max: 253 vm.uma.mbuf_cluster.bucket_size: 5 vm.uma.mbuf_cluster.flags: 0x2008 vm.uma.mbuf_cluster.size: 2048 vm.phys_pager_cluster: 1024 vfs.ffs.maxclustersearch: 10 (The Context-A57 had more than just 3 tars done over nfs.) The problem seems somewhat specific to Rock64-like contexts, not that I know in what specific respect(s) for that "like". =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)