From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19700 invoked from network); 10 Apr 2022 11:07:06 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 10 Apr 2022 11:07:06 -0000 Received: (qmail 19942 invoked by uid 550); 10 Apr 2022 11:07:04 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 17735 invoked from network); 9 Apr 2022 22:50:33 -0000 Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="jCXrQzaC" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1649544618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=V1kBnlLDxXJrDn3Ym/o0jfUWraEeb8vT4QibqoNC8R0=; b=jCXrQzaCMPv05KlNLVE59v4jRhGyslK3SegsFFdyhnsLbVRPWgybsguyIzgVoT2gaEFwEB +DP++ZQXB/kYRaAudEZn/Hx0nQ7o3IHpo92tHbnBK/n7UXxmA+St1/K1yP5lGFfxtts2HM MosQLCBtQWLFhP3+6JkwPnAuYGWhW+A= X-Gm-Message-State: AOAM533rIaFqrhZ90irB96wrgz0mADuWP1PAQ+hm1nS3k6S2kirPhr4b Yd8D33U1A5pEFgetR3TQn9kyZkWgyVSsVBXjz7M= X-Google-Smtp-Source: ABdhPJzrrbhQ9HnVmo/RJVcYHAuqkY+aJ6E0xHvSnmxkDi4HduRfSGlja7WVRZKmiKitFBDxGtH00VwdkNC5IuAuckQ= X-Received: by 2002:a5b:782:0:b0:634:683f:310e with SMTP id b2-20020a5b0782000000b00634683f310emr18750144ybq.398.1649544618118; Sat, 09 Apr 2022 15:50:18 -0700 (PDT) MIME-Version: 1.0 References: <20220409001047.234283-1-Jason@zx2c4.com> <20220409131816.GJ7074@brightrain.aerifal.cx> In-Reply-To: <20220409131816.GJ7074@brightrain.aerifal.cx> From: "Jason A. Donenfeld" Date: Sun, 10 Apr 2022 00:50:07 +0200 X-Gmail-Original-Message-ID: Message-ID: To: dalias@libc.org Cc: musl@lists.openwall.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [musl] [PATCH] getentropy: fail if buffer not completely filled Hi Rich, I can get rid of the <= case. glibc's paranoia might not actually make sense. Actually, presumably one can just get rid of the entire loop, assuming the < 256 guarantee continues to hold. I'll send you two patches, one that moderately fixes up this v1 (called v2) and one that gets rid of the loop entirely (v3). Jason