Package: libaio / 0.3.112-5

Metadata

Package Version Patches format
libaio 0.3.112-5 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
0001 Link against libgcc to avoid unresolved symbols.patch | (download)

src/Makefile | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 [patch libaio] link against libgcc to avoid unresolved symbols

We need to link agaisnt -lgcc, on at least hppa, PPC and ARC.
That's because in some corner-cases like compilation with -Os
on ARC and PPC so-called millicode (basically function prologue and
epilogue) implemented in libgcc.a is used. So we end up with
GLOBAL UNDEFINED symbol in libaio.so and then on linkage of the final
applicaiton LD fails to proceed saying:

0001 harness allow running tests against the installed li.patch | (download)

harness/Makefile | 6 5 + 1 - 0 !
1 file changed, 5 insertions(+), 1 deletion(-)

 [patch libaio 01/26] harness: allow running tests against the
 installed library

A user can now specify "LIBAIO=/path/to/libaio.so" in order to run
the test harness against the installed library.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0002 man Add missing space in man page references.patch | (download)

man/io.3 | 26 13 + 13 - 0 !
man/io_cancel.3 | 26 13 + 13 - 0 !
man/io_fsync.3 | 24 12 + 12 - 0 !
man/io_getevents.3 | 28 14 + 14 - 0 !
man/io_prep_fsync.3 | 26 13 + 13 - 0 !
man/io_prep_pread.3 | 26 13 + 13 - 0 !
man/io_prep_pwrite.3 | 26 13 + 13 - 0 !
man/io_queue_init.3 | 26 13 + 13 - 0 !
man/io_queue_release.3 | 24 12 + 12 - 0 !
man/io_queue_run.3 | 26 13 + 13 - 0 !
man/io_queue_wait.3 | 26 13 + 13 - 0 !
man/io_set_callback.3 | 26 13 + 13 - 0 !
man/io_submit.3 | 26 13 + 13 - 0 !
13 files changed, 168 insertions(+), 168 deletions(-)

 [patch libaio 02/26] man: add missing space in man page references

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0003 man Use the correct troff macro for comments.patch | (download)

man/io_fsync.3 | 12 6 + 6 - 0 !
man/io_getevents.3 | 36 18 + 18 - 0 !
man/io_prep_fsync.3 | 14 7 + 7 - 0 !
man/io_prep_pread.3 | 20 10 + 10 - 0 !
man/io_prep_pwrite.3 | 20 10 + 10 - 0 !
man/io_set_callback.3 | 2 1 + 1 - 0 !
man/io_submit.3 | 24 12 + 12 - 0 !
7 files changed, 64 insertions(+), 64 deletions(-)

 [patch libaio 03/26] man: use the correct troff macro for comments

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0004 man Refer to libaio.h instead of libio.h.patch | (download)

man/io.3 | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)

 [patch libaio 04/26] man: refer to libaio.h instead of libio.h

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0005 man End sentences with a period.patch | (download)

man/io_prep_fsync.3 | 4 2 + 2 - 0 !
man/io_prep_pread.3 | 4 2 + 2 - 0 !
man/io_prep_pwrite.3 | 4 2 + 2 - 0 !
man/io_queue_init.3 | 2 1 + 1 - 0 !
man/io_queue_release.3 | 2 1 + 1 - 0 !
man/io_queue_run.3 | 2 1 + 1 - 0 !
man/io_queue_wait.3 | 2 1 + 1 - 0 !
man/io_set_callback.3 | 2 1 + 1 - 0 !
8 files changed, 11 insertions(+), 11 deletions(-)

 [patch libaio 05/26] man: end sentences with a period

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0006 man Fix casing.patch | (download)

man/io_cancel.3 | 4 2 + 2 - 0 !
man/io_getevents.3 | 4 2 + 2 - 0 !
2 files changed, 4 insertions(+), 4 deletions(-)

 [patch libaio 06/26] man: fix casing

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0007 man Fix period formatting.patch | (download)

man/io.3 | 13 5 + 8 - 0 !
man/io_fsync.3 | 2 1 + 1 - 0 !
man/io_getevents.3 | 3 1 + 2 - 0 !
man/io_prep_fsync.3 | 2 1 + 1 - 0 !
man/io_prep_pread.3 | 5 2 + 3 - 0 !
man/io_prep_pwrite.3 | 5 2 + 3 - 0 !
man/io_queue_release.3 | 2 1 + 1 - 0 !
man/io_queue_run.3 | 2 1 + 1 - 0 !
man/io_queue_wait.3 | 2 1 + 1 - 0 !
man/io_submit.3 | 8 4 + 4 - 0 !
10 files changed, 19 insertions(+), 25 deletions(-)

 [patch libaio 07/26] man: fix period formatting

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0008 man Remove spurious spaces.patch | (download)

man/io_cancel.3 | 2 1 + 1 - 0 !
man/io_queue_run.3 | 2 1 + 1 - 0 !
man/io_queue_wait.3 | 2 1 + 1 - 0 !
3 files changed, 3 insertions(+), 3 deletions(-)

 [patch libaio 08/26] man: remove spurious spaces

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0009 man Remove spurious text.patch | (download)

man/io_getevents.3 | 1 0 + 1 - 0 !
man/io_prep_pread.3 | 2 1 + 1 - 0 !
man/io_queue_release.3 | 3 1 + 2 - 0 !
3 files changed, 2 insertions(+), 4 deletions(-)

 [patch libaio 09/26] man: remove spurious text

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0010 man Add None to empty sections.patch | (download)

man/io_set_callback.3 | 2 2 + 0 - 0 !
1 file changed, 2 insertions(+)

 [patch libaio 10/26] man: add "none" to empty sections

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0011 man Fix typos.patch | (download)

man/io.3 | 2 1 + 1 - 0 !
man/io_fsync.3 | 4 2 + 2 - 0 !
man/io_getevents.3 | 4 2 + 2 - 0 !
man/io_prep_fsync.3 | 2 1 + 1 - 0 !
man/io_prep_pread.3 | 2 1 + 1 - 0 !
man/io_prep_pwrite.3 | 4 2 + 2 - 0 !
man/io_queue_init.3 | 2 1 + 1 - 0 !
man/io_queue_release.3 | 2 1 + 1 - 0 !
man/io_queue_run.3 | 4 2 + 2 - 0 !
man/io_queue_wait.3 | 2 1 + 1 - 0 !
man/io_set_callback.3 | 2 1 + 1 - 0 !
man/io_submit.3 | 2 1 + 1 - 0 !
12 files changed, 16 insertions(+), 16 deletions(-)

 [patch libaio 11/26] man: fix typos

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0012 man Fix title header.patch | (download)

man/io.3 | 2 1 + 1 - 0 !
man/io_cancel.3 | 2 1 + 1 - 0 !
man/io_fsync.3 | 2 1 + 1 - 0 !
man/io_getevents.3 | 2 1 + 1 - 0 !
man/io_prep_fsync.3 | 2 1 + 1 - 0 !
man/io_prep_pread.3 | 2 1 + 1 - 0 !
man/io_prep_pwrite.3 | 2 1 + 1 - 0 !
man/io_queue_init.3 | 2 1 + 1 - 0 !
man/io_queue_release.3 | 2 1 + 1 - 0 !
man/io_queue_run.3 | 2 1 + 1 - 0 !
man/io_queue_wait.3 | 2 1 + 1 - 0 !
man/io_set_callback.3 | 2 1 + 1 - 0 !
man/io_submit.3 | 2 1 + 1 - 0 !
13 files changed, 13 insertions(+), 13 deletions(-)

 [patch libaio 12/26] man: fix title header

- Update year.
- Balance double quotes.
- Remove version from source argument as recommended in man-pages(7).
- Fix all sections numbers to 3.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0013 man Fix markup.patch | (download)

man/io.3 | 38 20 + 18 - 0 !
man/io_cancel.3 | 23 15 + 8 - 0 !
man/io_fsync.3 | 9 6 + 3 - 0 !
man/io_getevents.3 | 33 23 + 10 - 0 !
man/io_prep_fsync.3 | 59 42 + 17 - 0 !
man/io_prep_pread.3 | 19 7 + 12 - 0 !
man/io_prep_pwrite.3 | 14 5 + 9 - 0 !
man/io_queue_init.3 | 34 22 + 12 - 0 !
man/io_queue_release.3 | 16 10 + 6 - 0 !
man/io_queue_run.3 | 18 11 + 7 - 0 !
man/io_queue_wait.3 | 25 16 + 9 - 0 !
man/io_set_callback.3 | 5 3 + 2 - 0 !
man/io_submit.3 | 26 15 + 11 - 0 !
13 files changed, 195 insertions(+), 124 deletions(-)

 [patch libaio 13/26] man: fix markup

- Remove unnecessary macro argument quoting.
- Variables, pathnames in italics.
- Keywords in bold.
- Man page references in bold, followed by the man page number.
- Fix TP/TQ macro usage.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0014 man Fold short lines.patch | (download)

man/io_prep_fsync.3 | 3 1 + 2 - 0 !
man/io_submit.3 | 9 3 + 6 - 0 !
2 files changed, 4 insertions(+), 8 deletions(-)

 [patch libaio 14/26] man: fold short lines

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0015 man Escape verbatim n in order to make it through ro.patch | (download)

man/io.3 | 12 6 + 6 - 0 !
1 file changed, 6 insertions(+), 6 deletions(-)

 [patch libaio 15/26] man: escape verbatim \n in order to make it
 through roff

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0016 Use ctx consistently for io_context_t instead of ctx.patch | (download)

man/io_cancel.3 | 2 1 + 1 - 0 !
man/io_getevents.3 | 8 4 + 4 - 0 !
man/io_queue_run.3 | 2 1 + 1 - 0 !
man/io_queue_wait.3 | 2 1 + 1 - 0 !
man/io_submit.3 | 2 1 + 1 - 0 !
src/compat-0_1.c | 4 2 + 2 - 0 !
src/libaio.h | 4 2 + 2 - 0 !
src/vsys_def.h | 2 1 + 1 - 0 !
8 files changed, 13 insertions(+), 13 deletions(-)

 [patch libaio 16/26] use ctx consistently for io_context_t instead of
 ctx_id

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0017 harness Use destination strncpy expression for sizeo.patch | (download)

harness/cases/19.t | 2 1 + 1 - 0 !
harness/cases/21.t | 2 1 + 1 - 0 !
2 files changed, 2 insertions(+), 2 deletions(-)

 [patch libaio 17/26] harness: use destination strncpy() expression
 for sizeof() argument
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Even though this is the same size, as the sizeof() is derived from the
source expression, recent gcc versions will emit a warning, which is
turned into an error by -Werror:

  error: argument to ‘sizeof’ in ‘strncpy’ call is the same expression
    as the source; did you mean to use the size of the destination?
    [-Werror=sizeof-pointer-memaccess]

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0018 harness Use run time _SC_PAGE_SIZE instead of build .patch | (download)

harness/Makefile | 2 1 + 1 - 0 !
harness/cases/18.t | 34 24 + 10 - 0 !
2 files changed, 25 insertions(+), 11 deletions(-)

 [patch libaio 18/26] harness: use run-time _sc_page_size instead of
 build-time PAGESIZE

The getconf(1) command is inherently not cross-compilation friendly.
In addition PAGESIZE depends on the specific system, even within a
specific arch, so using a hard-coded value is never safe.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0019 harness Make RISC V use SYS_eventfd2 instead of unav.patch | (download)

harness/cases/16.t | 6 3 + 3 - 0 !
1 file changed, 3 insertions(+), 3 deletions(-)

 [patch libaio 19/26] harness: make risc-v use sys_eventfd2 instead of
 unavailable SYS_eventfd

This is a recent architecture and as such does not provide legacy
support for SYS_eventfd. Declare that we need to use the new syscall.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0020 harness Make the test exit with a code matching the .patch | (download)

harness/runtests.sh | 2 2 + 0 - 0 !
1 file changed, 2 insertions(+)

 [patch libaio 20/26] harness: make the test exit with a code matching
 the pass/fail state

This way we can use the exit code to check whether the tests passed or
failed, and fail the package build.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0021 harness add support for skipping tests.patch | (download)

harness/main.c | 20 16 + 4 - 0 !
harness/runtests.sh | 14 12 + 2 - 0 !
2 files changed, 28 insertions(+), 6 deletions(-)

 [patch libaio 21/26] harness: add support for skipping tests

Skipped tests will not cause the test harness to return failure.  An
exit status of "3" was chosen for skipped tests.  This doesn't
conflict with any of the current tests.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0022 harness Add fallback code for filesystems not suppor.patch | (download)

harness/cases/17.t | 11 9 + 2 - 0 !
harness/cases/18.t | 2 2 + 0 - 0 !
harness/cases/19.t | 10 8 + 2 - 0 !
harness/cases/21.t | 5 4 + 1 - 0 !
4 files changed, 23 insertions(+), 5 deletions(-)

 [patch libaio 22/26] harness: add fallback code for filesystems not
 supporting O_DIRECT

When running the harness on a filesystem such as a tmpfs, which do not
support O_DIRECT, fallback to calls without the flag.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
[JEM: change from duplicating the open call to using F_SETFL]
[JEM: 18 and 21 require O_DIRECT-skip if not present]
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0023 harness Handle ENOTSUP from io_submit with RWF_NOWAI.patch | (download)

harness/cases/21.t | 12 7 + 5 - 0 !
1 file changed, 7 insertions(+), 5 deletions(-)

 [patch libaio 23/26] harness: handle -enotsup from io_submit() with
 RWF_NOWAIT

On filesystems such as tmpfs the syscall might return -ENOTSUP instead
of EINVAL when it does not support the RWF_NOWAIT flag.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
[JEM: skip the test instead of returning success]
0024 harness skip 22.p if async_poll isn t supported.patch | (download)

harness/cases/22.t | 14 13 + 1 - 0 !
1 file changed, 13 insertions(+), 1 deletion(-)

 [patch libaio 24/26] harness: skip 22.p if async_poll isn't supported

Use the new skip error code instead of failing the test.  Also
add in a Local variables: section for emacs.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0025 harness fix read into PROT_WRITE mmap test.patch | (download)

harness/cases/5.t | 6 3 + 3 - 0 !
1 file changed, 3 insertions(+), 3 deletions(-)

 [patch libaio 25/26] harness: fix read into prot_write mmap test

This test has been broken forever.  Fix it up to perform an
aio_read using the result of a regular read as the expected
return code.

Reported-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

0026 harness Fix PROT_WRITE mmap check.patch | (download)

harness/cases/5.t | 9 4 + 5 - 0 !
1 file changed, 4 insertions(+), 5 deletions(-)

 [patch libaio 26/26] harness: fix prot_write mmap check

This partially reverts commit d7f5065448efb49b2a26e728ff735e12ea05b62e.

The actual problem in the original code was that read() was being used
to assert whether the buffer was readable, but the kernel was instead
reading from the file descriptor and then writing into the buffer, so
no EFAULT was being generated (on architectures that do so).

We needed to use a write() so that the kernel would read from the
buffer.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

00_arches.patch | (download)

harness/main.c | 10 10 + 0 - 0 !
src/libaio.h | 1 1 + 0 - 0 !
src/syscall-m68k.h | 5 5 + 0 - 0 !
src/syscall-mips.h | 54 54 + 0 - 0 !
src/syscall-parisc.h | 6 6 + 0 - 0 !
src/syscall.h | 6 6 + 0 - 0 !
6 files changed, 82 insertions(+)

 add/fix support for m68k, mips, paris, sparc
00_arches_sh.patch | (download)

harness/main.c | 2 1 + 1 - 0 !
src/libaio.h | 4 3 + 1 - 0 !
src/syscall-sh.h | 6 6 + 0 - 0 !
src/syscall.h | 2 2 + 0 - 0 !
4 files changed, 12 insertions(+), 2 deletions(-)

 add sh supprt
 The test-suite logs can be found at:
 .
 <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=535288>



00_arches_x32.patch | (download)

harness/main.c | 2 1 + 1 - 0 !
src/syscall-x86_64.h | 10 10 + 0 - 0 !
2 files changed, 11 insertions(+), 1 deletion(-)

 add support for x32 (from the yocto project)
00_arches_mips_fix_padding.patch | (download)

src/libaio.h | 5 4 + 1 - 0 !
1 file changed, 4 insertions(+), 1 deletion(-)

 fix structure padding for mips64
02_libdevdir.patch | (download)

Makefile | 10 9 + 1 - 0 !
src/Makefile | 12 7 + 5 - 0 !
2 files changed, 16 insertions(+), 6 deletions(-)

 fix installation of shared vs static libraries
04_no_Werror.patch | (download)

harness/Makefile | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 fix ftbfs with newer gcc 4.6
 Using -Werror on a released project is in general not a good idea, as changes
 in the toolchain and environment can trigger unexpected build failures.
05_build flags.patch | (download)

harness/Makefile | 7 5 + 2 - 0 !
src/Makefile | 18 9 + 9 - 0 !
2 files changed, 14 insertions(+), 11 deletions(-)

 honour user build flags
 CPPFLAGS, CFLAGS and LDFLAGS are user flags, which we need to preserve, any
 required flag that the build system needs, has to be set in some other flag
 so that the build will succeed even of the user flags are passed.
0001 Fix io_pgetevents syscall wrapper on 32 bit userland.patch | (download)

src/io_pgetevents.c | 38 31 + 7 - 0 !
src/libaio.h | 10 10 + 0 - 0 !
2 files changed, 41 insertions(+), 7 deletions(-)

 [patch libaio] fix io_pgetevents() syscall wrapper on 32-bit userland
 on 64-bit kernels

The kernel compat syscall in the kernel got introduced with a broken
layout, which requires a pointer to the actual sigset_t variable but
with the size of the running kernel, not the size of the compat code.

This means that when the wrapper sends the expected compat (32-bit)
pointer, the kernel reads a 64-bit pointer, eating with it also the
sigset size member. And then proceeds to fail the comparison of the
sigset_t size and returns EINVAL.

This really needs to be fixed in the kernel, as there's no apparent
user of the broken compat layout (from codesearch.debian.org, nor a
quick github.com search). But we have to workaround it in libaio so
that we can use kernels that have not yet been fixed.

We do that, by trying the non-broken layout (that would be used with
a 32-bit userland on a 32-bit kernel), and if that fails with -EINVAL
we retry with a structure padded to what the kernel expects.

Signed-off-by: Guillem Jover <guillem@hadrons.org>

0001 harness Print better error messages on error conditi.patch | (download)

harness/cases/22.t | 12 6 + 6 - 0 !
1 file changed, 6 insertions(+), 6 deletions(-)

 [patch libaio] harness: print better error messages on error
 conditions

These should help diagnose problems when dealing with error failures.

Signed-off-by: Guillem Jover <guillem@hadrons.org>