From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from blue.elm.relay.mailchannels.net (blue.elm.relay.mailchannels.net [23.83.212.20]) by sourceware.org (Postfix) with ESMTPS id B44C13857C63; Tue, 29 Sep 2020 04:47:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B44C13857C63 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=siddhesh@gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id A5DBB181473; Tue, 29 Sep 2020 04:47:57 +0000 (UTC) Received: from pdx1-sub0-mail-a9.g.dreamhost.com (100-100-138-5.trex.outbound.svc.cluster.local [100.100.138.5]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 418BB181484; Tue, 29 Sep 2020 04:47:57 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a9.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.10); Tue, 29 Sep 2020 04:47:57 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Occur-Rock: 300000655bef6e0b_1601354877510_3974567324 X-MC-Loop-Signature: 1601354877509:3716471962 X-MC-Ingress-Time: 1601354877509 Received: from pdx1-sub0-mail-a9.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a9.g.dreamhost.com (Postfix) with ESMTP id 0AD71B96F7; Mon, 28 Sep 2020 21:47:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gotplt.org; h=subject:to :cc:references:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=gotplt.org; bh=hAWo66 xY/WwFjyz7WvofG2ODS/c=; b=CF4J68uhAvrKoZsN+Kx/uXrZWryk3xcWowSXjm 5Mh/MwrzKfq5SWQ/RWSAk/IBaOJh7PH9Q4dhBmq070aFGiLY2FfYo14/wKAQhyfT vmC1z9O7cI0HV6Nyjot2uyUh/2of28BQBZGVFOOfk5X6gBTUCqlEhLSqO3IggeCj iH9og= Received: from [192.168.1.97] (unknown [123.252.202.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a9.g.dreamhost.com (Postfix) with ESMTPSA id 0F748B96E7; Mon, 28 Sep 2020 21:47:54 -0700 (PDT) Subject: Re: V3 [PATCH] Set tunable value as well as min/max values To: Siddhesh Poyarekar , "H.J. Lu" Cc: Florian Weimer , "H.J. Lu via Libc-alpha" References: <20200918160709.949608-1-hjl.tools@gmail.com> <20200918160709.949608-3-hjl.tools@gmail.com> <87eemm6n37.fsf@oldenburg2.str.redhat.com> <42e48ec7-4b11-387c-eaf0-50bc564dbca0@sourceware.org> X-DH-BACKEND: pdx1-sub0-mail-a9 From: Siddhesh Poyarekar Message-ID: <565f21f3-0630-2d4e-dff4-6cda90533fb5@gotplt.org> Date: Tue, 29 Sep 2020 10:17:46 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <42e48ec7-4b11-387c-eaf0-50bc564dbca0@sourceware.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedujedrvdejgdekkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpefuihguughhvghshhcurfhohigrrhgvkhgrrhcuoehsihguughhvghshhesghhothhplhhtrdhorhhgqeenucggtffrrghtthgvrhhnpeevteekhfffieetffehleffjeektdekfeffffejjefgjeeugefguefggfegvddtvdenucfkphepuddvfedrvdehvddrvddtvddrudejvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopegludelvddrudeikedruddrleejngdpihhnvghtpeduvdefrddvhedvrddvtddvrddujedvpdhrvghtuhhrnhdqphgrthhhpefuihguughhvghshhcurfhohigrrhgvkhgrrhcuoehsihguughhvghshhesghhothhplhhtrdhorhhgqedpmhgrihhlfhhrohhmpehsihguughhvghshhesghhothhplhhtrdhorhhgpdhnrhgtphhtthhopehsihguughhvghshhesshhouhhrtggvfigrrhgvrdhorhhg X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 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: Tue, 29 Sep 2020 04:48:00 -0000 (Sorry, replying to myself) On 29/09/20 10:15, Siddhesh Poyarekar via Libc-alpha wrote: > There should be a check here to ensure that the bounds do not exceed > statically set bounds. That is: > > if (minp != NULL && cur->type.min < *((int64_t *) minp)) > cur->type.min = *((int64_t *) minp); > if (maxp != NULL && cur->type.max > *((int64_t *) maxp)) > cur->type.max = *((int64_t *) maxp); Also check for min > max type invalid ranges. Siddhesh