lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6c73ce9c-c8b3-426a-5c0a-f66b634210fb@gmail.com>
Date:   Sat, 31 Jul 2021 13:02:27 +0200
From:   "Alejandro Colomar (man-pages)" <alx.manpages@...il.com>
To:     "G. Branden Robinson" <g.branden.robinson@...il.com>
Cc:     Mickaël Salaün <mic@...ikod.net>,
        Jann Horn <jannh@...gle.com>, Jonathan Corbet <corbet@....net>,
        Kees Cook <keescook@...omium.org>,
        Randy Dunlap <rdunlap@...radead.org>,
        Vincent Dagonneau <vincent.dagonneau@....gouv.fr>,
        landlock@...ts.linux.dev, linux-kernel@...r.kernel.org,
        linux-man@...r.kernel.org, linux-security-module@...r.kernel.org,
        Mickaël Salaün <mic@...ux.microsoft.com>,
        Michael Kerrisk <mtk.manpages@...il.com>
Subject: Re: [PATCH v2 1/4] landlock.7: Add a new page to introduce Landlock

Hi Branden,

On 7/31/21 2:15 AM, G. Branden Robinson wrote:
> Hi, Alex!
> 
> At 2021-07-30T14:59:52+0200, Alejandro Colomar (man-pages) wrote:
>> Yes, they were because of semantic newlines.
>>
>> The "rules" are:
>>
>> Follow mainly "semantic newlines" style (forgetting about the line
>> length), which will give you a text that (mostly) fits into 75 or 80
>> columns.
>>
>> If after doing that there are some lines that exceed the 75 or 80
>> column right margin, consider fixing that line by breaking it at a
>> different point or maybe breaking it further.  The 80 column limit is
>> a hard limit (I can't read anything past the 80 col), while the 75
>> limit is a bit softer (that's for allowing quotes in reviews) (if
>> fitting a line into col 75 would break it in a weird way, don't do
>> it).
>>
>> If I didn't explain myself enough, please tell me.
> 
> I'm a little puzzled by the above.  Semantic newlines have little to do
> with the output line length in *roff systems.  They arose due to a Bell
> Labs Unix Room practice, popularized by Brian Kernighan.  Brandon Rhodes
> has a backgrounder on this[1].
> 
> Man pages tend to be really flexible with respect to output line length.
> This is one reason the groff man macros expose a user-settable LL
> register.  The main limitations on line length are people using tbl(1)
> tables or disabling filling (with the .nf request or in .EX/.EE
> examples).  Another limitation is that as lines get shorter, it becomes
> hard to set the page headers and footers without them overlapping.
> 
> For the first two points there is not much the macro package can do;
> both tbl(1) and filling disablement leave the placement of line breaks
> in the hands of the document author, and they can abuse that power by
> "oversetting" a line; that is, making it longer than the configured line
> length.
> 
> The third point is a problem the macro package can overcome with some
> effort, by measuring the lengths of the components that go into a header
> or footer an abbreviating them.  This is not a theoretical concern;
> Erlang supplies some man pages with insanely long names[2], and you can
> see the problem in footers today on the man-pages site for any page
> groff ships, because Michael pulls from our Git repository (to my great
> relief, because I fix documentation errors and make other improvements
> all the time) and our version identifier has gotten crazily long because
> we're on the order of one thousand commits since the last release
> candidate, and gnulib's git-version-gen uses release tags, commit count
> since the tag, _and_ an abbreviated commit ID to generate the version
> string.  For my tree right now that's "1.23.0.rc1.999-7ae6d".
> 
> Here's a specimen of how that works out in a rendered page:
> <https://man7.org/linux/man-pages/man1/neqn.1.html> (scroll to the
> bottom).
> 
> I've fixed the problem for long page names for the next groff release,
> but it involved some string-manipulation gymnastics[3].  I haven't yet
> factored those out into their own (private) macro which I can also call
> when preparing the page footer.

I think you misunderstood the context here.

I meant all of that about input, i.e., the text of the patch itself, 
text to be added to a man page source text.

What I meant is that when you break lines semantically (when writing a 
patch),
and initially forget about the 80 (or 75) column right margin,
most of the lines you write will already (as a side effect of breaking 
lines semantically) be within the 80 (or 75) right margin.

For those that still don't fit into 80 characters after doing that, 
break further (or at some other point that may also break nicely 
semantically); otherwise, I won't see the text when editing the man page 
on my 80-col terminal.

For those that still don't fit into 75 characters after doing that,
consider breaking further, but only if doing so seems easy and lines 
break nicely.  I can still see after line 75, and I can do some effort 
to scroll an email a few columns if needed (when many quotes move the 
text further to the right).  So if the source code would break in a 
weird way because of forcing a 75 col right margin, please ignore that 
margin.


I hope I was clear this time.


BTW, thanks for your mail.  It wasn't related to what I meant, but was 
interesting :=)

Regards,

Alex


> 
> Regards,
> Branden
> 
> [1] https://rhodesmill.org/brandon/2012/one-sentence-per-line/
> [2] CosNotifyChannelAdmin_StructuredProxyPushSupplier(3erl)
> [3] https://git.savannah.gnu.org/cgit/groff.git/commit/?id=b7f38e8a1d698e1078d7c215d08fde57d8e919b9
> 


-- 
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ