[PATCH V2] LoongArch: Undef __NR_fstat and __NR_newfstatat.

Miao Wang shankerwangmiao@gmail.com
Tue Sep 24 11:33:28 GMT 2024


> 2024年9月24日 18:48,Florian Weimer <fweimer@redhat.com> 写道:
> 
> * Miao Wang:
> 
>>> 2024年9月24日 16:13,Xi Ruoyao <xry111@xry111.site> 写道:
>>> 
>>> On Tue, 2024-09-24 at 10:04 +0200, Florian Weimer wrote:
>>>>> In Linux 6.11, fstat and newfstatat are added back. To avoid the messy
>>>>> usage of the fstat, newfstatat, and statx system calls, we will continue
>>>>> using statx only in glibc, maintaining consistency with previous versions of
>>>>> the LoongArch-specific glibc implementation.
>>>> 
>>>>> +/* To avoid the messy usage of the fstat, newfstatat, and statx system calls, we
>>>>> +only use statx.  */
>>>> 
>>>> Comment and commit message mention statx twice, which find a bit
>>>> confusing.  I think the real issue is that generic code assumes that
>>>> fstat, newfstatat come first and statx comes later, and it's the other
>>>> way round for LoongArch.
>>>> 
>>>>> Reviewed-by: Florian Weimer <fweimer@redhat.com>
>>>> 
>>>> Sorry, I have not reviewed this.  Please do not add Reviewed-by:
>>>> proactively.  Perhaps you meant Suggested-by:?
>>> 
>>> Generally R-b should be only used if the reviewer gives an explicit one.
>>> But you can keep mine here.
>>> 
>>> Reviewed-by: Xi Ruoyao <xry111@xry111.site>
>> 
>> Grateful if you can also remove my R-b since I'm not confident enough to
>> review this.
> 
> Adhemerval, I assume you don't have any objections to this approach,
> given that we do the same thing on other architectures?

No, I do not object to this approach. However, additionally, I also suggested
that we can also directly use fstat() like other architectures when the user
chooses to compile glibc targeted to kernel versions not below 6.10.6, and thus
no need to completely remove the definition of fstat() from loongarch. Since
in most cases, people will leave the targeted kernel version to its default
setting, I'm also not object to completely remove the definition of fstat()
and newfstatat()

Cheers,

Miao Wang



More information about the Libc-alpha mailing list