From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x33.google.com (mail-oa1-x33.google.com [IPv6:2001:4860:4864:20::33]) by sourceware.org (Postfix) with ESMTPS id 17F313858D3C for ; Tue, 12 Sep 2023 13:13:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 17F313858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-1a28de15c8aso4290922fac.2 for ; Tue, 12 Sep 2023 06:13:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694524430; x=1695129230; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=6H/Wx6cLhEaW9QBqCXjoD2Cyf2pRwwYmCUgKr1pxH6Y=; b=y5uAujDfVs2Lswq0LIXzmm9RMblKjgV/gJtEy7jvsw+x+CXMQwzPr6KCIKKf9EW+E7 fRRfZsdtseAA27glOYpN06CloWym9AZHoxlG3GJN9Lv01or0stGVxgjO6RiuWIlJ5uQd flmA91LAHfmn7Hpn5WoBD1pSmLNemmB2bw2e+laYpCIUL7BdfLryDrpLZLYqdQ7oICa0 T/5RU0Ln5MbdyBqQvU00qU991qU7BRZixdie3CcklvYecdSyMhhHLKGKhazsieL31G4X U+Bb4xGLV0if1h8qRMSCa0bDvPaQsNyUIx6pV6pdEyExYSHhxXfwSmGrw3QrtweI6R0E dMVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694524430; x=1695129230; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6H/Wx6cLhEaW9QBqCXjoD2Cyf2pRwwYmCUgKr1pxH6Y=; b=QnQsMeY+X+jdjLEt6v3aWAtIOPHwEoSRQ1AqveEtc+94I/FtFarx1j96nowScmi73e YkInbM3ZoTtE2siDbt3oXFUBr5fMAU7qV3Z35GX7WfOMIEqKyfN+1lNPm6mA2NCeRuEy iABFAfSLx6aRd/a3VQD8TU+EITQYUTctQlq/loPdTz0XEu1t76PLManjoakvBKsJP5LQ EaCwS9IzN1IZgfa9uBU4JVguJn0o6ic26H1F/tUxvjLcGkT481cBdhliANbJiRo4gdmt 2V7cC0rbn1Y2VtSYMQdsMijTgNZ1RerZuhPf56cmYgf9JGfqDJeevQ3P9X5qa94cTc05 0Hcw== X-Gm-Message-State: AOJu0YwFZ3eUOt9zVJYm81MOsLP/lG6FzLBqo7eFFRfIPoFgidZv2tby PSYw/7lQ2+1ZqJEOyBFOrZQoarQbK8PSYGGHACCWTg== X-Google-Smtp-Source: AGHT+IFqTp6O7eYGoI3R6BP4rRodi37m/1bbJ9TtUG5F9zCem9PtVrYdvmbj2Y7kblQvoYq1bZrE1g== X-Received: by 2002:a05:6870:210f:b0:1c0:d0e8:8fda with SMTP id f15-20020a056870210f00b001c0d0e88fdamr15618787oae.16.1694524430327; Tue, 12 Sep 2023 06:13:50 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c0:91cb:1977:7e4f:e638:7fad? ([2804:1b3:a7c0:91cb:1977:7e4f:e638:7fad]) by smtp.gmail.com with ESMTPSA id hv10-20020a056871cc0a00b001c50fb56845sm5034373oac.16.2023.09.12.06.13.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Sep 2023 06:13:49 -0700 (PDT) Message-ID: <81044ded-1102-a01b-8633-680974f3c15e@linaro.org> Date: Tue, 12 Sep 2023 10:13:46 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: [PATCH] io: Do not implement fstat with fstatat Content-Language: en-US To: Florian Weimer Cc: Linus Torvalds , Adhemerval Zanella via Libc-alpha , Mateusz Guzik References: <20230905203421.2127750-1-adhemerval.zanella@linaro.org> <87ledjxc33.fsf@oldenburg.str.redhat.com> <25e6248a-ec47-71c3-680e-d7ab6fb80cba@linaro.org> <87wmww7y9e.fsf@oldenburg.str.redhat.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <87wmww7y9e.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.0 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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 12/09/23 02:31, Florian Weimer wrote: > * Adhemerval Zanella Netto: > >> On 11/09/23 16:32, Linus Torvalds wrote: >>> On Mon, 11 Sept 2023 at 06:11, Adhemerval Zanella Netto >>> wrote: >>>> >>>> I used the same fstatat logic, but using __NR_fstat should be fine. >>> >>> I think you should keep using the same logic as in fstatat(). >>> >>> Using "#ifdef __NR_newfstatat" basically checks for "not stat64". >>> >>> So, for example, x86-64 (and x64) have __NR_newfstatat, but 32-bit >>> i386 has __NR_fstatat64. >>> >>> Now, maybe the other tests effectively already capture this (ie I >>> suspect FSTATAT_USE_STATX may already be the thing that makes 32-bit >>> i386 different), but I do think it's actually better the way it was. >> >> The FSTATAT_USE_STATX already handles it, and there is a explicit comment >> later at !FSTATAT_USE_STATX for which ABIs are affected regarding glibc >> support. So either way (check __NR_newfstat and __NR_fstat) should be >> ok. > > If __NR_newfstatat is clear to the subject matter experts, I won't > object to it. But please add a comment. I sent a newer version that checks for __NR_stat instead, with comments to which ABI selects what [1]. [1] https://patchwork.sourceware.org/project/glibc/patch/20230911132548.1981093-1-adhemerval.zanella@linaro.org/