[PATCH libaio 0/8] Add time64 support

Guillem Jover <[email protected]>
Newsgroups gmane.linux.kernel.aio.general
Message-ID <[email protected]>
From: Guillem Jover <[email protected]>

[ Resending from debian.org as kvack.org is holding the hadrons.org
  mails in defer purgatory. :) Jeff, sorry for the dupes. ]

Hi!

In Debian, there was a decision to perform the time64 transition
for all 32-bit architectures using a fake SONAME bump (where the actual
SONAME does not get bumped but the packaging is changed as if it had,
with additional relationship constraints), except for i386.

As I'd rather not leave i386 behind, I implemented dual-ABI support for
the libraries I maintain there, including libaio, in a similar way as
what glibc or musl do. But because this was time sensitive and had not
been coordinated with upstream, I also did a real (local) SONAME bump to
avoid binary incompatibilities and stomping over the upstream SONAME, in
case this was rejected upstream, or modifications were requested or
similar (the SONAME in Debian is currently libaio.so.1t64, ideally to be
reverted).

The other issue I faced was that the kernel seems to be broken for
the io_pgetevents_time64() syscall on 64-bit kernels running 32-bit
userland, and had no time to verify whether what I thought could be
the fix would actually work. I did that this weekend, and it seems to
work, but as noted in that patch, I'm not entirely sure why it was not
wired like that initially, and I suspect all other 32-bit ports would
need the same treatment, but I cannot easily test them. I'm attaching
the patch against Linux 6.8.12 at the end of this series too, but the
code in libaio would not be able to rely on that anyway. Which is also
why I added that syscall support in a libaio patch and in another one
disabled it, so that I could test this more easily, and in the future
so that it can (if needed) be reverted more easily.

 [PATCH linux] arch: Wire up io_pgetevents_time64 compat entry point on i386

The code also unconditionally exports the time64 API on all 32-bit
arches, even for new ones where by default their ABI is already time64,
because I don't know of a clean way to get that at build time, except
for tracking an explicit list, which seemed too cumbersome.

In any case, let me know what you think, and if all is good and you
agree with the API/ABI changes, then I'd proceed to revert the local
SONAME bump in Debian, as that's currently causing some issues with
binary-only projects such as Oracle and similar.

I can also provide this as a merge request on pagure if that is better.

Thanks,
Guillem


Guillem Jover (8):
  Move semicolon to SYMVER and DEFSYMVER call sites
  Use new symver function attribute to support LTO builds
  Remove unused vsys_def.h
  Remove unused raw_syscall.c
  Wrap long declarations exceeding 80 columns
  Add time64 syscall support
  Disable io_pgetevents_time64 as it is broken on 64-bit kernel 32-bit
    userland
  Add time64 public functions on 32-bit architectures

 src/Makefile                                  |  9 +-
 src/{io_getevents.c => aio_getevents.c}       | 25 +++--
 src/aio_pgetevents.c                          | 93 +++++++++++++++++++
 src/aio_ring.h                                |  3 +-
 src/aio_time.h                                | 54 +++++++++++
 src/compat-0_1.c                              | 29 +++---
 src/io_cancel.c                               |  5 +-
 src/io_getevents.c                            | 25 +++--
 src/{io_queue_run.c => io_getevents_time64.c} | 25 +++--
 src/io_pgetevents.c                           | 40 +++-----
 ...{io_queue_run.c => io_pgetevents_time64.c} | 28 +++---
 src/io_queue_run.c                            |  5 +-
 src/io_queue_wait.c                           | 17 +++-
 src/io_submit.c                               |  3 +-
 src/libaio.h                                  | 52 ++++++++---
 src/libaio.map                                |  6 ++
 src/raw_syscall.c                             | 19 ----
 src/syscall.h                                 | 17 +++-
 src/vsys_def.h                                | 24 -----
 19 files changed, 330 insertions(+), 149 deletions(-)
 copy src/{io_getevents.c => aio_getevents.c} (60%)
 create mode 100644 src/aio_pgetevents.c
 create mode 100644 src/aio_time.h
 copy src/{io_queue_run.c => io_getevents_time64.c} (69%)
 copy src/{io_queue_run.c => io_pgetevents_time64.c} (66%)
 delete mode 100644 src/raw_syscall.c
 delete mode 100644 src/vsys_def.h

-- 
2.45.1


--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to [email protected].  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"[email protected]">[email protected]</a>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.