From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) by sourceware.org (Postfix) with ESMTPS id 2CB5E3858C53 for ; Tue, 5 Apr 2022 11:09:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2CB5E3858C53 Received: by mail-oi1-x22f.google.com with SMTP id i7so13010226oie.7 for ; Tue, 05 Apr 2022 04:09:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=klbB8tSt8fMBjHzoorEesoNnF1bifL/2YkWn5Y3qCiE=; b=oZav0O+iBkR6UN1ZmKe5WAiTlzHsaRJnfIp7qXFQr08D4/DPM+wJBqH7M5M8Qqie/8 Xl21K06FVVlGr7K3AVIA3EzgUzK2uHMlftPzMx2csAkPvEple28ReJZCv47Xx3wIeyWT uhxQZP0Ka8zvZc+uDtX+jejCG/uCoFlAkybRmjUuvQtj/Qc92cLws9RV1RCrUINWe+Hj H0Bua/fAcD8F4aOJMyctLx3jQDCfvO32PCtUtey2gWz9QvZf80WySghVacAIh7EIzSyU Wkr6Rh7fL3j9kheeguwXZ3ZNlyAy5CwK/SuTIXJrDrBLtdzrQdWOP9wnpdyuQMTokGw3 vtYw== X-Gm-Message-State: AOAM530XC2gwinVS6S4F8KnhAFNnJzcuQJl4WuACiPveJsWptgF2ic9U fuO1VrXJid8xzg72suSS1G+kjLUdt5/5fg== X-Google-Smtp-Source: ABdhPJxQ2vGUFNERfFA+8nHAsVHd6VYpY/4CLbMmEAGqJmpS4Sz/t2g7B9+AC1J/yrBR1f+KeagbYw== X-Received: by 2002:a05:6808:1a02:b0:2da:5cb7:1307 with SMTP id bk2-20020a0568081a0200b002da5cb71307mr1207863oib.238.1649156951416; Tue, 05 Apr 2022 04:09:11 -0700 (PDT) Received: from ?IPV6:2804:431:c7cb:a6c0:26f4:3c2a:73ae:3e2? ([2804:431:c7cb:a6c0:26f4:3c2a:73ae:3e2]) by smtp.gmail.com with ESMTPSA id k124-20020aca3d82000000b002ef4c5bb9dbsm5151238oia.0.2022.04.05.04.09.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Apr 2022 04:09:10 -0700 (PDT) Message-ID: <74507db6-d3cf-d8c8-02dd-ce982494ed28@linaro.org> Date: Tue, 5 Apr 2022 08:09:07 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH v3] linux: Fix __closefrom_fallback iterates until max int (BZ#28993) Content-Language: en-US To: Florian Weimer , Adhemerval Zanella via Libc-alpha References: <20220404210131.702898-1-adhemerval.zanella@linaro.org> <87r16c2ehm.fsf@oldenburg.str.redhat.com> From: Adhemerval Zanella In-Reply-To: <87r16c2ehm.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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, 05 Apr 2022 11:09:14 -0000 On 05/04/2022 04:09, Florian Weimer wrote: > * Adhemerval Zanella via Libc-alpha: > >> The __closefrom_fallback tries to get a available file descriptor >> if the initial open ("/proc/self/fd/", ...) fails. It assumes the >> failure would be only if procfs is not mount (ENOENT), however if >> the the proc file is not accessible (due some other kernel filtering >> such apparmor) it will iterate over a potentially large file set >> issuing close calls. >> >> It should only try the close fallback if open returns EMFILE. > > The last line no longer matches the patch. Ack, I will update it. > > Rest looks okay. Thanks.