From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) by sourceware.org (Postfix) with ESMTPS id 52BA9382E807 for ; Thu, 11 Mar 2021 12:37:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 52BA9382E807 Received: by mail-qt1-x832.google.com with SMTP id a11so963229qto.2 for ; Thu, 11 Mar 2021 04:37:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=WQWIXzM/3DzquEJBzgc+Nvn7QUmia6zxGssSD4b7DW8=; b=OiAlS0/OYnFtDXcajBji5D2kaG6mBtKtBxMQR7XleW3EDbkEeINOJ/kPQkumm+QokV odZEIaLmvIa2LioefJ0psaMcFXg+NKDC7FejMEM8BaGAXT4vfogxk2PlKHq+gtJD7KdQ pZiQevXXe9cGA14cyeno91+yI7M+i1sc/cPDm/OAk47OnRnrMjtrnoxEvHp02eUxRvp9 B3RCAGvPsR7DvpXIgQSzER6JgX4DayUYXRU1ydG8W5xh4Fp4Oi4bqNmekBraMCpYVvYg /2rAXilahv/D53e4fEk8s4B2Q4b7HVjvxAQgGt/5cktEvZsNXOIEGKc9EVriA2qLeUag 1hrw== X-Gm-Message-State: AOAM532GtFkT0AChO0Gt/9wq4c8bgkkjy/dsnJw2xG2JQ7NkqPhBEw1N bZMrVT3FUzNqrpGvlIV/gOaYH/ip+LgZ/bbo X-Google-Smtp-Source: ABdhPJwCOEmuj3UPPYCPyqyQbzrvzE3CMVM8tDjmRUPzKaJlt8bufXnp8iE2Pspd3ViLWlRpx1Yrnw== X-Received: by 2002:a05:622a:303:: with SMTP id q3mr6883415qtw.235.1615466244768; Thu, 11 Mar 2021 04:37:24 -0800 (PST) Received: from [192.168.1.4] ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id o89sm1629092qte.84.2021.03.11.04.37.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Mar 2021 04:37:24 -0800 (PST) Subject: Re: [PATCH] io: Return EBAFD for negative file descriptor on fstat (BZ #27559) To: Florian Weimer , Adhemerval Zanella via Libc-alpha References: <20210311120325.3264302-1-adhemerval.zanella@linaro.org> <87o8fpkhvn.fsf@oldenburg.str.redhat.com> From: Adhemerval Zanella Message-ID: <8ed07bf3-5695-0637-092c-c4fc0a3de95f@linaro.org> Date: Thu, 11 Mar 2021 09:37:22 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <87o8fpkhvn.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.5 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 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: Thu, 11 Mar 2021 12:37:26 -0000 On 11/03/2021 09:13, Florian Weimer wrote: > * Adhemerval Zanella via Libc-alpha: > >> Now that fstat is implemented on top fstatat we need to handle negative >> inputs. > > Please mention AT_FDCWD in the commit message. Or add a comment to the > code that the check rejects AT_FDCWD, which would otherwise be accepted > by the kernel. > > The patch looks okay otherwise. Ack. I will also add the missing tst-stat-lfs (which is just a wrapper to set __FILE_OFFSET_BITS=64).