From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 15E513858428 for ; Tue, 12 Sep 2023 05:36:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 15E513858428 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694496974; 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=bUpv9ZIsN7PvuQM6sIoYCg7XIanLEKyztM1nsRXGETU=; b=Ll10throfs399JxJCz6gu9lDJ22YZSPDgW7e3PNYwO93ZJ3i/rQ7Cgx32EPm0iHtiW+DVF 5zJUKVUGI1u8jPMIAEPfJygY7WgH3dGBEmHTuteSlul6M7pWawzl0r1hrFfrtDO5jFooXm 4+/uykIFaRw6c0CcpD3Bti+ytPHhgXU= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-45-5l8kSsFAO-m38S-qzKGiJA-1; Tue, 12 Sep 2023 01:32:00 -0400 X-MC-Unique: 5l8kSsFAO-m38S-qzKGiJA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D931E3C0BE25; Tue, 12 Sep 2023 05:31:59 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.67]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1FDE140C2009; Tue, 12 Sep 2023 05:31:59 +0000 (UTC) From: Florian Weimer To: Adhemerval Zanella Netto Cc: Linus Torvalds , Adhemerval Zanella via Libc-alpha , Mateusz Guzik Subject: Re: [PATCH] io: Do not implement fstat with fstatat References: <20230905203421.2127750-1-adhemerval.zanella@linaro.org> <87ledjxc33.fsf@oldenburg.str.redhat.com> <25e6248a-ec47-71c3-680e-d7ab6fb80cba@linaro.org> Date: Tue, 12 Sep 2023 07:31:57 +0200 In-Reply-To: <25e6248a-ec47-71c3-680e-d7ab6fb80cba@linaro.org> (Adhemerval Zanella Netto's message of "Mon, 11 Sep 2023 19:10:35 -0300") Message-ID: <87wmww7y9e.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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: * 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. Thanks, Florian