public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Florian Weimer <fweimer@redhat.com>,
	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: Mon, 11 Sep 2023 19:10:35 -0300	[thread overview]
Message-ID: <25e6248a-ec47-71c3-680e-d7ab6fb80cba@linaro.org> (raw)
In-Reply-To: <CAHk-=wieN0DEeDZ=h6bkK4MXapQOhrJpf_k3PNizbXc6Fc0uOg@mail.gmail.com>



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.

> 
> ... except maybe a comment somewhere? And maybe it might be good to
> actually make this "struct stat64" vs "struct stat" more obvious.
> 
>                      Linus

  reply	other threads:[~2023-09-11 22:10 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 [this message]
2023-09-12  5:31         ` Florian Weimer
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=25e6248a-ec47-71c3-680e-d7ab6fb80cba@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=fweimer@redhat.com \
    --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).