This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Consolidate fallocate/fallocate64 implementations
- From: Arnd Bergmann <arnd at arndb dot de>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 28 Jun 2016 10:46:29 +0200
- Subject: Re: [PATCH] Consolidate fallocate/fallocate64 implementations
- Authentication-results: sourceware.org; auth=none
- References: <1467056073-8061-1-git-send-email-adhemerval dot zanella at linaro dot org> <5771AE52 dot 6090406 at linaro dot org> <5771B2DD dot 1080207 at linaro dot org>
On Monday, June 27, 2016 8:12:29 PM CEST Adhemerval Zanella wrote:
>
> My mistake here, I was with the wrong assumption aarch64/ilp32 was
> following the already supported ilp32 architectures for passing
> off_t/off64_t (I still reading all the discussion for ilp32).
>
> I see now correct way is indeed what Yuri Norov has suggested in
> the previous [1] thread:
>
> fallocate.c
> #ifndef __OFF_T_MATCHES_OFF64_T
> /* build fallocate */
> #endif
>
> and
>
> fallocate64.c
>
> /* build fallocate64 */
> #ifdef __OFF_T_MATCHES_OFF64_T
> weak_alias (fallocate64, fallocate)
> #endif
Right.
> I am assuming here aarch64/ilp32 is not defining __ASSUME_WORDSIZE64_ILP32
> (which I plan to check in the patchset).
Correct, that is the idea. We've gone back and forth on this quite a bit,
but this is the latest iteration after several reviewers pointed out that
handling the passing of 64-bit arguments for a small number of syscalls
adds a significant complexity for all other syscalls in the kernel since
it requires zeroing the upper register halves for almost all syscalls
without a way to do it during the syscall entry.
Arnd