public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/30804] New: F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64
@ 2023-08-28 21:07 aurelien at aurel32 dot net
  2023-08-28 21:15 ` [Bug libc/30804] " aurelien at aurel32 dot net
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: aurelien at aurel32 dot net @ 2023-08-28 21:07 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30804

            Bug ID: 30804
           Summary: F_GETLK, F_SETLK, and F_SETLKW value change for
                    powerpc64 with -D_FILE_OFFSET_BITS=64
           Product: glibc
           Version: 2.38
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: aurelien at aurel32 dot net
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---
              Host: powerpc64le-unknown-linux-gnu
            Target: powerpc64le-unknown-linux-gnu
             Build: powerpc64le-unknown-linux-gnu

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug libc/30804] F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64
  2023-08-28 21:07 [Bug libc/30804] New: F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64 aurelien at aurel32 dot net
@ 2023-08-28 21:15 ` aurelien at aurel32 dot net
  2023-08-28 21:44 ` aurelien at aurel32 dot net
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: aurelien at aurel32 dot net @ 2023-08-28 21:15 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30804

Aurelien Jarno <aurelien at aurel32 dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |http://bugs.debian.org/1050
                   |                            |592

--- Comment #1 from Aurelien Jarno <aurelien at aurel32 dot net> ---
On powerpc64le-unknown-linux-gnu the record locking constants values with
-D_FILE_OFFSET_BITS=64 have changed between glibc 2.37 and glibc 2.38:

glibc 2.37:
- F_GETLK: 12
- F_SETLK: 13
- F_SETLKW: 14

glibc 2.38:
- F_GETLK: 5
- F_SETLK: 6
- F_SETLKW: 7

This is caused by the following commit:

commit 5f828ff824e3b7cd133ef905b8ae25ab8a8f3d66
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue May 30 16:40:38 2023 -0300

    io: Fix F_GETLK, F_SETLK, and F_SETLKW for powerpc64

    Different than other 64 bit architectures, powerpc64 defines the
    LFS POSIX lock constants  with values similar to 32 ABI, which
    are meant to be used with fcntl64 syscall.  Since powerpc64 kABI
    does not have fcntl, the constants are adjusted with the
    FCNTL_ADJUST_CMD macro.

    The 4d0fe291aed3a476a changed the logic of generic constants
    LFS value are equal to the default values; which is now wrong
    for powerpc64.

    Fix the value by explicit define the previous glibc constants
    (powerpc64 does not need to use the 32 kABI value, but it simplifies
    the FCNTL_ADJUST_CMD which should be kept as compatibility).

    Checked on powerpc64-linux-gnu and powerpc-linux-gnu.

This commit correctly fixes the issue for the case where _FILE_OFFSET_BITS is
not defined, but introduce a new issue for the case -D_FILE_OFFSET_BITS=64,
causing an ABI breakage. This can be observed for instance in perl and
libfile-fcntllock-perl if they are not built against the same glibc version.

Note that the patch has been backported to at least the 2.36 and 2.37 branches.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug libc/30804] F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64
  2023-08-28 21:07 [Bug libc/30804] New: F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64 aurelien at aurel32 dot net
  2023-08-28 21:15 ` [Bug libc/30804] " aurelien at aurel32 dot net
@ 2023-08-28 21:44 ` aurelien at aurel32 dot net
  2023-08-29  7:08 ` sam at gentoo dot org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: aurelien at aurel32 dot net @ 2023-08-28 21:44 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30804

--- Comment #2 from Aurelien Jarno <aurelien at aurel32 dot net> ---
Proposed patch to fix the issue:
https://sourceware.org/pipermail/libc-alpha/2023-August/151199.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug libc/30804] F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64
  2023-08-28 21:07 [Bug libc/30804] New: F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64 aurelien at aurel32 dot net
  2023-08-28 21:15 ` [Bug libc/30804] " aurelien at aurel32 dot net
  2023-08-28 21:44 ` aurelien at aurel32 dot net
@ 2023-08-29  7:08 ` sam at gentoo dot org
  2023-08-29  8:07 ` schwab@linux-m68k.org
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: sam at gentoo dot org @ 2023-08-29  7:08 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30804

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sam at gentoo dot org

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug libc/30804] F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64
  2023-08-28 21:07 [Bug libc/30804] New: F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64 aurelien at aurel32 dot net
                   ` (2 preceding siblings ...)
  2023-08-29  7:08 ` sam at gentoo dot org
@ 2023-08-29  8:07 ` schwab@linux-m68k.org
  2023-08-29  8:37 ` fweimer at redhat dot com
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: schwab@linux-m68k.org @ 2023-08-29  8:07 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30804

--- Comment #3 from Andreas Schwab <schwab@linux-m68k.org> ---
Note that the kernel ABI for ppc64 only uses the 5/6/7 values, and the glibc
fcntl wrapper accepts both ranges, so this is not an ABI break.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug libc/30804] F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64
  2023-08-28 21:07 [Bug libc/30804] New: F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64 aurelien at aurel32 dot net
                   ` (3 preceding siblings ...)
  2023-08-29  8:07 ` schwab@linux-m68k.org
@ 2023-08-29  8:37 ` fweimer at redhat dot com
  2023-08-29 13:42 ` adhemerval.zanella at linaro dot org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: fweimer at redhat dot com @ 2023-08-29  8:37 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30804

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com

--- Comment #4 from Florian Weimer <fweimer at redhat dot com> ---
It's the historic behavior. With glibc-2.17-326.el7_9.ppc64:

#include <fcntl.h>
#include <stdio.h>

int
main (void)
{
#ifdef _FILE_OFFSET_BITS
  printf ("_FILE_OFFSET_BITS=%d\n", _FILE_OFFSET_BITS);
#endif
  printf ("F_GETLK=%d\n", F_GETLK);
  printf ("F_SETLK=%d\n", F_SETLK);
  printf ("F_SETLKW=%d\n", F_SETLKW);
  return 0;
}

This gives:

F_GETLK=5
F_SETLK=6
F_SETLKW=7

Or:

_FILE_OFFSET_BITS=64
F_GETLK=12
F_SETLK=13
F_SETLKW=14

glibc-2.17-326.el7_9.ppc64le shows the same thing.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug libc/30804] F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64
  2023-08-28 21:07 [Bug libc/30804] New: F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64 aurelien at aurel32 dot net
                   ` (4 preceding siblings ...)
  2023-08-29  8:37 ` fweimer at redhat dot com
@ 2023-08-29 13:42 ` adhemerval.zanella at linaro dot org
  2023-08-29 14:01 ` fweimer at redhat dot com
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2023-08-29 13:42 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30804

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg

--- Comment #5 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
The powercp64 fcntl will handle F_GETLK/F_SETLK/F_SETLKW with the historical
values with the FCNTL_ADJUST_CMD macro, so old binaries will continue to work
as expected. I am not sure if we still need to keep exporting old values for
powerpc64.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug libc/30804] F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64
  2023-08-28 21:07 [Bug libc/30804] New: F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64 aurelien at aurel32 dot net
                   ` (5 preceding siblings ...)
  2023-08-29 13:42 ` adhemerval.zanella at linaro dot org
@ 2023-08-29 14:01 ` fweimer at redhat dot com
  2023-09-07 19:57 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: fweimer at redhat dot com @ 2023-08-29 14:01 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30804

--- Comment #6 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Adhemerval Zanella from comment #5)
> The powercp64 fcntl will handle F_GETLK/F_SETLK/F_SETLKW with the historical
> values with the FCNTL_ADJUST_CMD macro, so old binaries will continue to
> work as expected. I am not sure if we still need to keep exporting old
> values for powerpc64.

Agreed, my comment was misguided, I thought the proposed change was going in
the opposite direction. I do not think we need to preserve the old behavior.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug libc/30804] F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64
  2023-08-28 21:07 [Bug libc/30804] New: F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64 aurelien at aurel32 dot net
                   ` (6 preceding siblings ...)
  2023-08-29 14:01 ` fweimer at redhat dot com
@ 2023-09-07 19:57 ` cvs-commit at gcc dot gnu.org
  2023-09-07 19:59 ` aurelien at aurel32 dot net
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-07 19:57 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30804

--- Comment #7 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Aurelien Jarno <aurel32@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=434bf72a94de68f0cc7fbf3c44bf38c1911b70cb

commit 434bf72a94de68f0cc7fbf3c44bf38c1911b70cb
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Mon Aug 28 23:30:37 2023 +0200

    io: Fix record locking contants for powerpc64 with __USE_FILE_OFFSET64

    Commit 5f828ff824e3b7cd1 ("io: Fix F_GETLK, F_SETLK, and F_SETLKW for
    powerpc64") fixed an issue with the value of the lock constants on
    powerpc64 when not using __USE_FILE_OFFSET64, but it ended-up also
    changing the value when using __USE_FILE_OFFSET64 causing an API change.

    Fix that by also checking that define, restoring the pre
    4d0fe291aed3a476a commit values:

    Default values:
    - F_GETLK: 5
    - F_SETLK: 6
    - F_SETLKW: 7

    With -D_FILE_OFFSET_BITS=64:
    - F_GETLK: 12
    - F_SETLK: 13
    - F_SETLKW: 14

    At the same time, it has been noticed that there was no test for io lock
    with __USE_FILE_OFFSET64, so just add one.

    Tested on x86_64-linux-gnu, i686-linux-gnu and
    powerpc64le-unknown-linux-gnu.

    Resolves: BZ #30804.
    Co-authored-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug libc/30804] F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64
  2023-08-28 21:07 [Bug libc/30804] New: F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64 aurelien at aurel32 dot net
                   ` (7 preceding siblings ...)
  2023-09-07 19:57 ` cvs-commit at gcc dot gnu.org
@ 2023-09-07 19:59 ` aurelien at aurel32 dot net
  2023-09-08  5:28 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: aurelien at aurel32 dot net @ 2023-09-07 19:59 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30804

Aurelien Jarno <aurelien at aurel32 dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
   Target Milestone|---                         |2.39
         Resolution|---                         |FIXED

--- Comment #8 from Aurelien Jarno <aurelien at aurel32 dot net> ---
Fixed on 2.39

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug libc/30804] F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64
  2023-08-28 21:07 [Bug libc/30804] New: F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64 aurelien at aurel32 dot net
                   ` (8 preceding siblings ...)
  2023-09-07 19:59 ` aurelien at aurel32 dot net
@ 2023-09-08  5:28 ` cvs-commit at gcc dot gnu.org
  2023-09-08  5:28 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-08  5:28 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30804

--- Comment #9 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The release/2.38/master branch has been updated by Aurelien Jarno
<aurel32@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5bdef6f27c91f45505ed5444147be4ed0e9bc3c7

commit 5bdef6f27c91f45505ed5444147be4ed0e9bc3c7
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Mon Aug 28 23:30:37 2023 +0200

    io: Fix record locking contants for powerpc64 with __USE_FILE_OFFSET64

    Commit 5f828ff824e3b7cd1 ("io: Fix F_GETLK, F_SETLK, and F_SETLKW for
    powerpc64") fixed an issue with the value of the lock constants on
    powerpc64 when not using __USE_FILE_OFFSET64, but it ended-up also
    changing the value when using __USE_FILE_OFFSET64 causing an API change.

    Fix that by also checking that define, restoring the pre
    4d0fe291aed3a476a commit values:

    Default values:
    - F_GETLK: 5
    - F_SETLK: 6
    - F_SETLKW: 7

    With -D_FILE_OFFSET_BITS=64:
    - F_GETLK: 12
    - F_SETLK: 13
    - F_SETLKW: 14

    At the same time, it has been noticed that there was no test for io lock
    with __USE_FILE_OFFSET64, so just add one.

    Tested on x86_64-linux-gnu, i686-linux-gnu and
    powerpc64le-unknown-linux-gnu.

    Resolves: BZ #30804.
    Co-authored-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
    (cherry picked from commit 434bf72a94de68f0cc7fbf3c44bf38c1911b70cb)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug libc/30804] F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64
  2023-08-28 21:07 [Bug libc/30804] New: F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64 aurelien at aurel32 dot net
                   ` (9 preceding siblings ...)
  2023-09-08  5:28 ` cvs-commit at gcc dot gnu.org
@ 2023-09-08  5:28 ` cvs-commit at gcc dot gnu.org
  2023-09-15 21:20 ` cvs-commit at gcc dot gnu.org
  2023-09-16  9:11 ` cvs-commit at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-08  5:28 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30804

--- Comment #10 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The release/2.37/master branch has been updated by Aurelien Jarno
<aurel32@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=be26b29262bbae080acb8bb16855df6ac4c57c98

commit be26b29262bbae080acb8bb16855df6ac4c57c98
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Mon Aug 28 23:30:37 2023 +0200

    io: Fix record locking contants for powerpc64 with __USE_FILE_OFFSET64

    Commit 5f828ff824e3b7cd1 ("io: Fix F_GETLK, F_SETLK, and F_SETLKW for
    powerpc64") fixed an issue with the value of the lock constants on
    powerpc64 when not using __USE_FILE_OFFSET64, but it ended-up also
    changing the value when using __USE_FILE_OFFSET64 causing an API change.

    Fix that by also checking that define, restoring the pre
    4d0fe291aed3a476a commit values:

    Default values:
    - F_GETLK: 5
    - F_SETLK: 6
    - F_SETLKW: 7

    With -D_FILE_OFFSET_BITS=64:
    - F_GETLK: 12
    - F_SETLK: 13
    - F_SETLKW: 14

    At the same time, it has been noticed that there was no test for io lock
    with __USE_FILE_OFFSET64, so just add one.

    Tested on x86_64-linux-gnu, i686-linux-gnu and
    powerpc64le-unknown-linux-gnu.

    Resolves: BZ #30804.
    Co-authored-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
    (cherry picked from commit 434bf72a94de68f0cc7fbf3c44bf38c1911b70cb)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug libc/30804] F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64
  2023-08-28 21:07 [Bug libc/30804] New: F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64 aurelien at aurel32 dot net
                   ` (10 preceding siblings ...)
  2023-09-08  5:28 ` cvs-commit at gcc dot gnu.org
@ 2023-09-15 21:20 ` cvs-commit at gcc dot gnu.org
  2023-09-16  9:11 ` cvs-commit at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-15 21:20 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30804

--- Comment #11 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The release/2.36/master branch has been updated by Aurelien Jarno
<aurel32@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0ae2afe45ee0e88b37b89399b6a8cf0330f46937

commit 0ae2afe45ee0e88b37b89399b6a8cf0330f46937
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Mon Aug 28 23:30:37 2023 +0200

    io: Fix record locking contants for powerpc64 with __USE_FILE_OFFSET64

    Commit 5f828ff824e3b7cd1 ("io: Fix F_GETLK, F_SETLK, and F_SETLKW for
    powerpc64") fixed an issue with the value of the lock constants on
    powerpc64 when not using __USE_FILE_OFFSET64, but it ended-up also
    changing the value when using __USE_FILE_OFFSET64 causing an API change.

    Fix that by also checking that define, restoring the pre
    4d0fe291aed3a476a commit values:

    Default values:
    - F_GETLK: 5
    - F_SETLK: 6
    - F_SETLKW: 7

    With -D_FILE_OFFSET_BITS=64:
    - F_GETLK: 12
    - F_SETLK: 13
    - F_SETLKW: 14

    At the same time, it has been noticed that there was no test for io lock
    with __USE_FILE_OFFSET64, so just add one.

    Tested on x86_64-linux-gnu, i686-linux-gnu and
    powerpc64le-unknown-linux-gnu.

    Resolves: BZ #30804.
    Co-authored-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
    (cherry picked from commit 434bf72a94de68f0cc7fbf3c44bf38c1911b70cb)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug libc/30804] F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64
  2023-08-28 21:07 [Bug libc/30804] New: F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64 aurelien at aurel32 dot net
                   ` (11 preceding siblings ...)
  2023-09-15 21:20 ` cvs-commit at gcc dot gnu.org
@ 2023-09-16  9:11 ` cvs-commit at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-16  9:11 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30804

--- Comment #12 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The release/2.35/master branch has been updated by Aurelien Jarno
<aurel32@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=762a747faefad05cbfa463a1e7f7b00684d56f77

commit 762a747faefad05cbfa463a1e7f7b00684d56f77
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Mon Aug 28 23:30:37 2023 +0200

    io: Fix record locking contants for powerpc64 with __USE_FILE_OFFSET64

    Commit 5f828ff824e3b7cd1 ("io: Fix F_GETLK, F_SETLK, and F_SETLKW for
    powerpc64") fixed an issue with the value of the lock constants on
    powerpc64 when not using __USE_FILE_OFFSET64, but it ended-up also
    changing the value when using __USE_FILE_OFFSET64 causing an API change.

    Fix that by also checking that define, restoring the pre
    4d0fe291aed3a476a commit values:

    Default values:
    - F_GETLK: 5
    - F_SETLK: 6
    - F_SETLKW: 7

    With -D_FILE_OFFSET_BITS=64:
    - F_GETLK: 12
    - F_SETLK: 13
    - F_SETLKW: 14

    At the same time, it has been noticed that there was no test for io lock
    with __USE_FILE_OFFSET64, so just add one.

    Tested on x86_64-linux-gnu, i686-linux-gnu and
    powerpc64le-unknown-linux-gnu.

    Resolves: BZ #30804.
    Co-authored-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
    (cherry picked from commit 434bf72a94de68f0cc7fbf3c44bf38c1911b70cb)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-09-16  9:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-28 21:07 [Bug libc/30804] New: F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with -D_FILE_OFFSET_BITS=64 aurelien at aurel32 dot net
2023-08-28 21:15 ` [Bug libc/30804] " aurelien at aurel32 dot net
2023-08-28 21:44 ` aurelien at aurel32 dot net
2023-08-29  7:08 ` sam at gentoo dot org
2023-08-29  8:07 ` schwab@linux-m68k.org
2023-08-29  8:37 ` fweimer at redhat dot com
2023-08-29 13:42 ` adhemerval.zanella at linaro dot org
2023-08-29 14:01 ` fweimer at redhat dot com
2023-09-07 19:57 ` cvs-commit at gcc dot gnu.org
2023-09-07 19:59 ` aurelien at aurel32 dot net
2023-09-08  5:28 ` cvs-commit at gcc dot gnu.org
2023-09-08  5:28 ` cvs-commit at gcc dot gnu.org
2023-09-15 21:20 ` cvs-commit at gcc dot gnu.org
2023-09-16  9:11 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).