From: David Daney <david.daney@cavium.com>
To: Bruno Haible <bruno@clisp.org>
Cc: "bug-gnulib@gnu.org" <bug-gnulib@gnu.org>,
"linux-mips@linux-mips.org" <linux-mips@linux-mips.org>
Subject: Re: bug in fchownat in n32 and 64 ABIs
Date: Thu, 27 Oct 2011 12:26:42 -0700 [thread overview]
Message-ID: <4EA9B072.5000107@cavium.com> (raw)
In-Reply-To: <201110272107.38510.bruno@clisp.org>
On 10/27/2011 12:07 PM, Bruno Haible wrote:
> Hi Linux/MIPS folks,
>
> Found this bug by running the gnulib POSIX test suite: In the fchownat()
> call, an uid_t or gid_t of value (uid_t)-1 or (gid_t)-1 means no change.
> See<http://pubs.opengroup.org/onlinepubs/9699919799/functions/fchownat.html>.
> This value is correctly recognized on all Unices, _except_ Linux/MIPS
> in n32 and 64 ABIs.
>
[...]
> $ gcc -Wall -mabi=64 foo.c
> $ ./a.out ; echo $?
> fchownat: Operation not permitted
> fchownat: Operation not permitted
> fchownat: Operation not permitted
> 14
> $ gcc -Wall -mabi=n32 foo.c
> $ ./a.out ; echo $?
> fchownat: Operation not permitted
> fchownat: Operation not permitted
> fchownat: Operation not permitted
> 14
> $ gcc -Wall -mabi=32 foo.c
> $ ./a.out ; echo $?
>
> Other relevant data:
> - kernel version is 2.6.27.1
> - glibc version is 2.7
> - gcc version is 4.3.2 (Debian).
Debian doesn't support 64-bit ABIs, so this list is incomplete. Where
did you get your 64-bit libc ?
>
> 'strace' of this program shows that the system call that returns with -1/EPERM
> is a call to SYS_6254 (in n32 ABI) or SYS_5250 (in 64 ABI).
>
Can you get strace -- version 4.5.20 or later and build it for the
corresponding ABI? That should properly decode the relevant syscalls.
Once you have that, you might post the strace output.
In the mean time I might give it a try with my 2.9 glibc on a 2.6.32.27
kernels.
David Daney
next prev parent reply other threads:[~2011-10-27 19:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-27 19:07 bug in fchownat in n32 and 64 ABIs Bruno Haible
2011-10-27 19:26 ` David Daney [this message]
2011-10-27 21:29 ` David Daney
2011-10-27 23:59 ` Bruno Haible
2011-10-28 0:26 ` David Daney
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=4EA9B072.5000107@cavium.com \
--to=david.daney@cavium.com \
--cc=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
--cc=linux-mips@linux-mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.