public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Michal Nazarewicz <mina86@mina86.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>,
	Florian Weimer <fweimer@redhat.com>
Cc: libc-alpha@sourceware.org, carlos@systemhalted.org
Subject: Re: [PATCH] linux: sysconf: limit _SC_MAX_ARG to 6 MiB [BZ #25305]
Date: Thu, 08 Apr 2021 03:49:01 +0200	[thread overview]
Message-ID: <xbep7vi7pf19uea38xjhtmul@mina86.com> (raw)
In-Reply-To: <5fbf7775-7a3c-6b89-81d6-8596d371e27c@linaro.org>

>> * Adhemerval Zanella:
>>> IMHO being conservative and use the lower bound of all supported kernels.
>>> I really don't think trying to be smart here with dynamic probing
>>> will add much, specially since this upper limit is what kernel will
>>> support from now on.

> On 07/04/2021 16:04, Florian Weimer wrote:
>> Ah, if the conservative choice does not penalize newer kernels, then I
>> guess that's okay as well.

Indeed; the 6 MiB bound penalises old unsupported kernels.  Barring
Linux changing things more, the calculation in this patch is what kernel
is using going forward.

On Wed, Apr 07 2021, Adhemerval Zanella wrote:
> My understanding is newer kernel are more restrictive since they limit
> maximum argument plus environment size to up to 6MB, different than older 
> kernels that have a higher bar to up 1/4 of maximum stack size.

Specifically, Linux’s limit is:

    clamp(128 KiB, max stack size / 4, 6 MiB)

so stack size still plays a role but only if it’s in 0.5–24 MiB range.
Outside of that range one of the static bounds is used.

> So I take you don't oppose to the patch.

>> Then the argument goes like this: If you want us to make the limit
>> dynamic, add something to the auxiliary vector. 8-)

> I am not sure if kernel will be willing to make this dynamic, at least
> it seems not be an issue.

I can’t read Linus’ head but I think you’re right; it seems the attitude
in LKML is to use 128 KiB and be done with it.

-- 
Best regards
ミハウ “𝓶𝓲𝓷𝓪86” ナザレヴイツ
«If at first you don’t succeed, give up skydiving»

  parent reply	other threads:[~2021-04-08  1:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-07 15:10 Michal Nazarewicz
2021-04-07 18:36 ` Adhemerval Zanella
2021-04-07 18:41   ` Florian Weimer
2021-04-07 18:52     ` Adhemerval Zanella
2021-04-07 19:04       ` Florian Weimer
2021-04-07 19:34         ` Adhemerval Zanella
2021-04-07 19:36           ` Florian Weimer
2021-04-08  1:49           ` Michal Nazarewicz [this message]
2021-04-12 20:59 ` Adhemerval Zanella
2021-04-12 21:31   ` Michal Nazarewicz
2021-04-13 11:53     ` Adhemerval Zanella
2021-04-13 12:13     ` Andreas Schwab
2021-04-13 13:36       ` Adhemerval Zanella
2021-04-13 14:41         ` Andreas Schwab
2021-04-13 14:45           ` Adhemerval Zanella
2021-04-13 19:57         ` Michal Nazarewicz
2021-04-13 20:47           ` Adhemerval Zanella

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=xbep7vi7pf19uea38xjhtmul@mina86.com \
    --to=mina86@mina86.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=carlos@systemhalted.org \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).