From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by sourceware.org (Postfix) with ESMTPS id 3FEC0393A434 for ; Thu, 8 Apr 2021 01:49:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3FEC0393A434 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=mina86.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mnazarewicz@gmail.com Received: by mail-lf1-x134.google.com with SMTP id b4so1214393lfi.6 for ; Wed, 07 Apr 2021 18:49:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:in-reply-to:references:face:date :message-id:mime-version:content-transfer-encoding; bh=DJPmNHIWtwJUYCKXhsBGRGm7+l7sYPmE20R1+kXRO1I=; b=p0z+YRPmc4viNkJDISPLgZVXlfYz8t6QOgvsdgOoZMan7iBgN0hgDATGYxJ6rDwesC 6Qmz6IxmbtiH2qFIMCYK6B2MAhxt7w2WaKYHSgbf+OZbxuyuYQagx6BEtT3IH4rj2D+d LkY31VLTw1tr+E59dmc8oFgvikqbSSOUBadsTWrd5mk8yC9R7F8G48v8hD1GjPTAgIYj WN9J7N911vyfN0fD5YRcwFaeyd/fGvyTA75YehQwTS+AcF/TCykULIt/D1fmSlMHtkbD 6by3Pkx8HI6OMafSb2h14tMUw6T41oqFjEuX6BB5iecfhK+F7U8Q0FfyZNVuBgiGgDAQ r+4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :face:date:message-id:mime-version:content-transfer-encoding; bh=DJPmNHIWtwJUYCKXhsBGRGm7+l7sYPmE20R1+kXRO1I=; b=nKFk3YKJSFwdj8x2zTyxBHJbb3JAzryQmpG7TiGfGCF+FtuSi5DXqLdXIE1hysegEe 9m53F+dj5D+xk+p5Nw5sL1Mi4rJOMtIHXNCVWa6pVBN5az8i708q1MNE+nrEiY728f+A qqsD/3O9UNgks65NX63W5jEc5lV44AyNelpLRZ1ov2cP4Ibr5qmETLOjva9g9KiMZmdz B8BeTnVJp+6a12olJJNp9Xy3HjIDQzCbqS0/+Ba/QLeLKVdehVEvfxtCY20Eiozhqt6G wxSxiA13c3QhmwCtGABn0YgHpr4gGO8SYE4/AZYOco9scRnuw16bxu0r1rGKDzoWUHOT 3V9w== X-Gm-Message-State: AOAM533xw+9dqgzbJcXoYzV9LTcl6PwOeATZ2oTp4Q3CftWhdr/KWOUP DOIzEkRvKlNCDAsWK7bYYXdLSbrqI08sMw== X-Google-Smtp-Source: ABdhPJxM5zV6Iif/sM24Owi9ANhSigFUEUuJs9aq+/BPZupXVtURKDZMkxef6K8cv8CrKkvzdCsppw== X-Received: by 2002:a05:6512:70c:: with SMTP id b12mr4363040lfs.621.1617846547977; Wed, 07 Apr 2021 18:49:07 -0700 (PDT) Received: from erwin (213-238-124-172.adsl.inetia.pl. [213.238.124.172]) by smtp.gmail.com with ESMTPSA id x4sm2688387ljj.91.2021.04.07.18.49.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Apr 2021 18:49:07 -0700 (PDT) Sender: =?UTF-8?Q?Micha=C5=82_Nazarewicz?= From: Michal Nazarewicz To: Adhemerval Zanella , Florian Weimer Cc: libc-alpha@sourceware.org, carlos@systemhalted.org Subject: Re: [PATCH] linux: sysconf: limit _SC_MAX_ARG to 6 MiB [BZ #25305] In-Reply-To: <5fbf7775-7a3c-6b89-81d6-8596d371e27c@linaro.org> References: <20210407151058.1176364-1-mina86@mina86.com> <6c926d3b-3094-f220-7777-91dacf975275@linaro.org> <878s5u7x9g.fsf@oldenburg.str.redhat.com> <5e390f1e-3c31-c4e9-aae0-168f0b4725c7@linaro.org> <87pmz57w7w.fsf@oldenburg.str.redhat.com> <5fbf7775-7a3c-6b89-81d6-8596d371e27c@linaro.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEWjgIPUupJ7V0jLrom4gmjPs42bY0MdFRLHgE5UPDCbfGm9mH6qmkAJAAACNUlEQVQ4y23SMW/aQBQHcKtb2Zx0abZeIxuTCSELJVmiinboRpGHJktloROQzUQcB2vUXFe35XBYUicRAiYUVSjfru/d+QwlnDz5p/97z+dnVcw5WVQ2zxpcdrQTTiIin3bB6lcaTnaBO5c8eoJG2yBl5El+Ob3fglMW3RUIkQ9xxQ8UBEFQafiVZ/5wZqWExM+LvwEegAY856xZO7MgQkq3jxpO56GXxO5VDQAjpVmWqPLYoSGvIahIuvAVHLeEEDd9DRYAkUcKzscAUgCQ0hwSKBOExuh7kvQQUskY4yjsHqeaCfFjLK6x1AzeeyiRD/C1JW5aGqw5IS5mZre+FVz0RVtoUGPJmBCP/4QPJGKUA1oEMJwAHIv+JljYZYCJi1FRQS2DaUw6sgsQTMfb0Fz9RvjyP3iR01x9RGj0N6HgcefS819CSjidDwIFPSFEDgRg1tUw2oBXAB33T2DV63XbM6AqhZzysm3ZcKZrKBAn5O7Q1rAqGoBKNGRsmUG1n0NKaJtd2RnscTWvnom6fGngDaNrCNl728A+c2gLQP8PFpkEjNWjlGqQfPEhWRqoInSyi2p+drsGDjhAeAeSQI8kfjSwbwCn8gblvIftInzT30HdQT2HlU4gwCbLSQ7VFqVEA0RCtjTwtnjdLlkasNjQwF7x02F2iQSL8XIGB8VQ71WBKHHf5XCIgLUUtIcGSBPhdZIQorpEBrxsqT3GYgRpmicIqrsEgSZm3FG+iJbHYid0/wGj+iTGCXRsqQAAAABJRU5ErkJggg== Date: Thu, 08 Apr 2021 03:49:01 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=3.1 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, MSGID_RANDY, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: *** X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2021 01:49:10 -0000 >> * Adhemerval Zanella: >>> IMHO being conservative and use the lower bound of all supported kernel= s. >>> 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= =20 > kernels that have a higher bar to up 1/4 of maximum stack size. Specifically, Linux=E2=80=99s limit is: clamp(128 KiB, max stack size / 4, 6 MiB) so stack size still plays a role but only if it=E2=80=99s in 0.5=E2=80=9324= 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=E2=80=99t read Linus=E2=80=99 head but I think you=E2=80=99re right; = it seems the attitude in LKML is to use 128 KiB and be done with it. --=20 Best regards =E3=83=9F=E3=83=8F=E3=82=A6 =E2=80=9C=F0=9D=93=B6=F0=9D=93=B2=F0=9D=93=B7= =F0=9D=93=AA86=E2=80=9D =E3=83=8A=E3=82=B6=E3=83=AC=E3=83=B4=E3=82=A4=E3=83= =84 =C2=ABIf at first you don=E2=80=99t succeed, give up skydiving=C2=BB