From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] syscalls/fcntl34: Use -D_FILE_OFFSET_BITS=64 for all cases
Date: Tue, 16 Aug 2016 13:30:55 +0200 [thread overview]
Message-ID: <20160816113055.GB24312@rei.lan> (raw)
In-Reply-To: <3ABF60118B9B784CA5BF7C841D2F00EC01000B69@de02wembxa.internal.synopsys.com>
Hi!
> Actually both glibc and uClibc use fcntl64 by default and usually fail
> when you try to pass 32-bit flock structure to it when you use OFD
> locks. Then fcntl64 fails in fcntl_setlk64 routing while checking
> l_pid field. I checked this case on 32-bit targets: x86 and ARC.
Ah, I've missed that.
Given that the manual for fcntl() says:
The newer system call employs a different structure for file locking,
flock64, and corresponding commands, F_GETLK64, F_SETLK64, and
F_SETLKW64.
I guess that the F_OFD_XXX locks should be added to this list as they
explicitly require flock64 as well. And the fix to the test would be
using struct flock64 instead of struct flock.
--
Cyril Hrubis
chrubis@suse.cz
prev parent reply other threads:[~2016-08-16 11:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-12 17:11 [LTP] [PATCH] syscalls/fcntl34: Use -D_FILE_OFFSET_BITS=64 for all cases Yuriy Kolerov
2016-08-15 12:08 ` Cyril Hrubis
2016-08-16 9:46 ` Yuriy Kolerov
2016-08-16 10:02 ` Cyril Hrubis
2016-08-16 10:47 ` Yuriy Kolerov
2016-08-16 11:02 ` Peter Maydell
2016-08-16 11:31 ` Cyril Hrubis
2016-08-16 11:30 ` Cyril Hrubis [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=20160816113055.GB24312@rei.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/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