public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: "G. Branden Robinson" <g.branden.robinson@gmail.com>
To: наб <nabijaczleweli@nabijaczleweli.xyz>
Cc: "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>,
	linux-man@vger.kernel.org,
	"Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
Subject: Re: [PATCH v2 3/5] alloca.3: clarify reasoning for no error return in BUGS
Date: Wed, 29 Oct 2025 17:55:00 -0500	[thread overview]
Message-ID: <20251029225500.squcpizsa3n255el@illithid> (raw)
In-Reply-To: <jhuyhyu2xgbcqwahlmjqc7lvqw44mrzuoveikrcdy6gm2ztu3o@tarta.nabijaczleweli.xyz>

[-- Attachment #1: Type: text/plain, Size: 3783 bytes --]

Hi наб,

At 2025-10-29T16:22:47+0100, наб wrote:
> On Wed, Oct 29, 2025 at 03:42:00AM -0500, G. Branden Robinson wrote:
> > The sentence is confusingly cast, but the problem is not as simple
> > as you describe.  It is common in English to use "neither" without
> > "not" preceding or following.
> (I think if you want to be quaint you could say that embedded
> negatives are negatives for the purposes of "neither" and the like,
> even after lexicalising so far you can't analyse them in modern
> english: im-possible n[ot]-either n[ot]-or, as you demonstrate below.)

As a practitioner, I don't think English grammar works that way;
sometimes whatever the semantic counterpart of a morpheme is gets bound
so tightly into a word that the word stops admitting semantic analysis
in this way.

But I'm not a trained linguist.

> > Neither wolverines nor beavers have yet self-domesticated.
> > Neither C nor C++ are good language choices for novice programmers.
> > 
> > That's more grammatically conventional.  However, I would recast
> > even more aggressively, as I find "due to the nature of the stack"
> > hand-wavy.
> I don't disagree but I'd say it doesn't matter? "How the stack
> actually works" for our purposes of overallocating is really neither
> here nor there and changes depending on the system (grows up/down) and
> hardening (guard pages y/n), but the pitfall is similar regardless.

Right.  The phrasing "due to the way X works" feels like a lazy maneuver
from a technical writing perspective.  Maybe not often, but sometimes,
the programmer will want to _know_ the way stack allocations work in
Linux, because they've used alloca() and gotten themselves into trouble.
(Or maybe more likely, a colleague or former fellow employee got them
into it.)

As a rule, I think it's poor form to note the existence of an
explanation for some phenomenon without providing a citation to where
that explanation can be found.  That's what citation and footnoting
practices are _for_.  (In man pages, we can't have footnotes, but we can
have informal inline citations, and we do have the "See Also" section.)

I grant that sometimes, no explanation exists in a natural language; the
source code _is_ the documentation, and if you have enough hairs on your
chest/vested stock options/buddies who can hook you up with a new gig if
you faceplant in your current one, you go look at that source code, and
if you solve your problem, you document as little as possible and teach
no one anything.

Thus my attempt to trick some linux-mm person into wearily pointing out
the availability of ReST/Sphinx/whatever document[1] that explains
everything needs to know about the subject...which we could then cite in
the alloca(3) page.

But clever sharks are clever, and not easily fooled.

> Classical wisdom for alloca()/blowing the stack in general is you
> don't know you did it until you accessed some byte of your stack that
> you actually can't see, and the allocation is infallible for this
> reason, and AFAIK this holds in present day.

Agreed; I don't know of an alternative failure mode, but I've always
been pretty conservative with stack use--I grew up with irritable,
memory-starved machines--and never aggressive with alloca().

> I'll agree that the wording above is not my best work.

Given enough time, little of my own work endures the critique of my
future self.

[snip]
> This seems to be semantically similar to your sample,
> so I'd say we're in accord.

I think so.

> The wording downthread seems solid.

Regards,
Branden

[1] Or, if it's really glibc that handles this in a platform-independent
    manner, then we're talking Texinfo.  Of course there are other
    libcs...

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2025-10-29 22:55 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-23 21:01 [PATCH 1/2] strdup.3: drop mention of "the GNU GCC suite" наб
2021-08-23 21:01 ` [PATCH 2/2] alloca.3: rewrite NOTES наб
2021-08-24  9:50   ` Michael Kerrisk (man-pages)
2021-08-24 10:04     ` G. Branden Robinson
2021-08-24 11:58       ` наб
2021-08-24 10:33     ` Alejandro Colomar (man-pages)
2021-08-24 11:18       ` Alejandro Colomar (man-pages)
2021-08-25 18:21       ` наб
2021-08-24 11:47     ` наб
2021-08-24  9:21 ` [PATCH 1/2] strdup.3: drop mention of "the GNU GCC suite" Michael Kerrisk (man-pages)
2021-08-24 10:28   ` наб
2021-08-24 10:40     ` Alejandro Colomar (man-pages)
2021-09-14 12:40 ` [PATCH v2 0/5] alloca(3) commentary re-write наб
2021-09-14 12:40   ` [PATCH v2 1/5] strdup.3: drop mention of "the GNU GCC suite" наб
2021-09-15 19:49     ` Alejandro Colomar (man-pages)
2021-09-14 12:41   ` [PATCH v2 2/5] alloca.3: clarify origins in CONFORMING TO наб
2021-09-15 19:49     ` Alejandro Colomar (man-pages)
2021-09-14 12:41   ` [PATCH v2 3/5] alloca.3: clarify reasoning for no error return in BUGS наб
2021-09-15 19:42     ` Alejandro Colomar (man-pages)
2021-09-17 20:35       ` наб
2025-10-29  8:42       ` G. Branden Robinson
2025-10-29 10:15         ` Alejandro Colomar
2025-10-29 10:30           ` G. Branden Robinson
2025-10-29 10:58             ` Alejandro Colomar
2025-10-29 11:12               ` G. Branden Robinson
2025-10-29 11:23                 ` Alejandro Colomar
2025-10-29 15:22         ` наб
2025-10-29 22:55           ` G. Branden Robinson [this message]
2021-09-14 12:41   ` [PATCH v2 4/5] alloca.3: remove GCC faffling from NOTES наб
2021-09-15 19:48     ` Alejandro Colomar (man-pages)
2021-09-17 20:45       ` наб
2021-09-19 19:39         ` Alejandro Colomar (man-pages)
2021-09-14 12:41   ` [PATCH v2 5/5] alloca.3: simplfy malloc(3) suite comparison, note VLAs наб

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251029225500.squcpizsa3n255el@illithid \
    --to=g.branden.robinson@gmail.com \
    --cc=alx.manpages@gmail.com \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=nabijaczleweli@nabijaczleweli.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox