[LTP] [PATCH v1 0/2] fcntl{34,36}: Fixes for Android arm64

Edward Liaw edliaw@google.com
Thu Apr 27 02:29:03 CEST 2023


Fixes: 7643115aaacb ("fcntl{34,36}: Always use 64-bit flock struct to avoid EINVAL")

In Richard's commit I think that he had meant to write that the flock64
type (not fcntl64 type) had been removed from some libcs.  I believe
that was the reason why he added the my_flock64 type.

On Android arm64, this test was breaking for two reasons:

1. The my_flock64 type definition did not match the expected type when
compiled for 64 bits.
2. The test was mixing fcntl and the flock64 struct when compiled for 32
bits.

Both seem to be ok on x86_64 but not on arm64.  To fix it, I gated the
compat function on TST_ABI64 instead of tst_kernel_bits.

Also, I'm not sure that the my_flock64 struct is needed with these
patches.  I think that l64 can just have the flock64 type.

Edward Liaw (2):
  fcntl{34,36}: Only use fcntl64 with 32bit abi
  fcntl{34,36}: Use arch dependent types for my_flock64

 .../kernel/syscalls/fcntl/fcntl_common.h      | 24 ++++++++++++-------
 1 file changed, 15 insertions(+), 9 deletions(-)

--
2.40.1.495.gc816e09b53d-goog



More information about the ltp mailing list