Message ID | 20241011080253.2764887-2-caiyinyu@loongson.cn |
---|---|
State | New |
Headers | show |
Series | LoongArch: Regenerate loongarch/arch-syscall.h by build-many-glibcs.py update-syscalls. | expand |
*> Hi, there seems to be some mistake. > According to Florian Weimer's suggestion[0] and my testing, the purpose > of commit 255dc1e4ed8 [1] was to prevent build-many-glibcs.py > update-syscalls from adding __NR_fstat 80 and __NR_newfstatat 79 to > loongarch/arch-syscall.h, as we have currently decided not to use these > two syscalls to remain consistent with the previous implementation.(for > full discussion, see: > https://sourceware.org/pipermail/libc-alpha/2024-September/thread.html, > thread: [PATCH] LoongArch: Add fstat64 and fstatat64). > > However, I found that __NR_fstat 80 and __NR_newfstatat 79 were added to > loongarch/arch-syscall.h in commit > 02de16df481f15d5f6f2a8d98aa1bb2888aec13b [1]. This resulted in 79 and 80 > being used. > > I regenerate the loongarch/arch-syscall.h headers and send the patch > *assuming I am allowed to modify arch-syscall.h.* I think this change is correct. Adhemerval, how did you generate the arch-syscall.h update? With automatic generation, the presence of fixup-asm-unistd.h should have avoided adding these constants to arch-syscall.h. During the glibc build, fixup-asm-unistd.h is not used.
On 11/10/24 05:45, Florian Weimer wrote: > *> Hi, there seems to be some mistake. >> According to Florian Weimer's suggestion[0] and my testing, the purpose >> of commit 255dc1e4ed8 [1] was to prevent build-many-glibcs.py >> update-syscalls from adding __NR_fstat 80 and __NR_newfstatat 79 to >> loongarch/arch-syscall.h, as we have currently decided not to use these >> two syscalls to remain consistent with the previous implementation.(for >> full discussion, see: >> https://sourceware.org/pipermail/libc-alpha/2024-September/thread.html, >> thread: [PATCH] LoongArch: Add fstat64 and fstatat64). >> >> However, I found that __NR_fstat 80 and __NR_newfstatat 79 were added to >> loongarch/arch-syscall.h in commit >> 02de16df481f15d5f6f2a8d98aa1bb2888aec13b [1]. This resulted in 79 and 80 >> being used. >> >> I regenerate the loongarch/arch-syscall.h headers and send the patch >> *assuming I am allowed to modify arch-syscall.h.* > > I think this change is correct. > > Adhemerval, how did you generate the arch-syscall.h update? With > automatic generation, the presence of fixup-asm-unistd.h should have > avoided adding these constants to arch-syscall.h. During the glibc > build, fixup-asm-unistd.h is not used. I ran the usual update-syscall rule, but I might have missed this committed so I did not update the file correctly.
diff --git a/sysdeps/unix/sysv/linux/loongarch/arch-syscall.h b/sysdeps/unix/sysv/linux/loongarch/arch-syscall.h index 7e732256fd..8bb82448a7 100644 --- a/sysdeps/unix/sysv/linux/loongarch/arch-syscall.h +++ b/sysdeps/unix/sysv/linux/loongarch/arch-syscall.h @@ -59,7 +59,6 @@ #define __NR_fsmount 432 #define __NR_fsopen 430 #define __NR_fspick 433 -#define __NR_fstat 80 #define __NR_fstatfs 44 #define __NR_fsync 82 #define __NR_ftruncate 46 @@ -167,7 +166,6 @@ #define __NR_munmap 215 #define __NR_name_to_handle_at 264 #define __NR_nanosleep 101 -#define __NR_newfstatat 79 #define __NR_nfsservctl 42 #define __NR_open_by_handle_at 265 #define __NR_open_tree 428