public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Florian Weimer <fweimer@redhat.com>
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 10:13:46 -0300	[thread overview]
Message-ID: <81044ded-1102-a01b-8633-680974f3c15e@linaro.org> (raw)
In-Reply-To: <87wmww7y9e.fsf@oldenburg.str.redhat.com>



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
>>> <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.

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/

      reply	other threads:[~2023-09-12 13:13 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
2023-09-12 13:13           ` Adhemerval Zanella Netto [this message]

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=81044ded-1102-a01b-8633-680974f3c15e@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).