public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	 Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>,
	 Mateusz Guzik <mjguzik@gmail.com>
Subject: Re: [PATCH] io: Do not implement fstat with fstatat
Date: Tue, 12 Sep 2023 07:31:57 +0200	[thread overview]
Message-ID: <87wmww7y9e.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <25e6248a-ec47-71c3-680e-d7ab6fb80cba@linaro.org> (Adhemerval Zanella Netto's message of "Mon, 11 Sep 2023 19:10:35 -0300")

* Adhemerval Zanella Netto:

> On 11/09/23 16:32, Linus Torvalds wrote:
>> On Mon, 11 Sept 2023 at 06:11, Adhemerval Zanella Netto
>> <adhemerval.zanella@linaro.org> 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


  reply	other threads:[~2023-09-12  5:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-05 20:34 Adhemerval Zanella
2023-09-05 20:48 ` Mateusz Guzik
2023-09-05 20:56   ` Adhemerval Zanella Netto
2023-09-05 21:03     ` Mateusz Guzik
2023-09-06 20:48 ` Florian Weimer
2023-09-11 13:11   ` Adhemerval Zanella Netto
2023-09-11 19:32     ` Linus Torvalds
2023-09-11 22:10       ` Adhemerval Zanella Netto
2023-09-12  5:31         ` Florian Weimer [this message]
2023-09-12 13:13           ` Adhemerval Zanella Netto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wmww7y9e.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    --cc=mjguzik@gmail.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).