diff --git a/openucx-s390x-support.patch b/openucx-s390x-support.patch index f1ba789..e132404 100644 --- a/openucx-s390x-support.patch +++ b/openucx-s390x-support.patch @@ -1,4 +1,4 @@ -commit a8b24a8cd4124e3ffb7b682b94b3a1192e48c9c7 +commit b47dad27703f0b59072f5a8d8fba99c1d173f8f0 Author: Nicolas Morey-Chaisemartin Date: Thu Aug 9 07:41:24 2018 +0200 @@ -407,3 +407,27 @@ index 000000000000..225e4e5e896a + +#endif + +diff --git src/ucs/sys/sys.c src/ucs/sys/sys.c +index 62e555b409d1..8adc26241781 100644 +--- src/ucs/sys/sys.c ++++ src/ucs/sys/sys.c +@@ -1134,8 +1134,19 @@ void *ucs_sys_realloc(void *old_ptr, size_t old_length, size_t new_length) + if (old_ptr == NULL) { + /* Note: Must pass the 0 offset as "long", otherwise it will be + * partially undefined when converted to syscall arguments */ ++#if defined(__s390x__) ++ long int _args[6] = { ++ (long int) NULL, ++ (long int) new_length, ++ (long int) PROT_READ|PROT_WRITE, ++ (long int) MAP_PRIVATE|MAP_ANONYMOUS, ++ (long int) -1, ++ (long int) 0ul}; ++ ptr = (void*)syscall(__NR_mmap, _args); ++#else + ptr = (void*)syscall(__NR_mmap, NULL, new_length, PROT_READ|PROT_WRITE, + MAP_PRIVATE|MAP_ANONYMOUS, -1, 0ul); ++#endif + if (ptr == MAP_FAILED) { + ucs_log_fatal_error("mmap(NULL, %zu, READ|WRITE, PRIVATE|ANON) failed: %m", + new_length); diff --git a/openucx.changes b/openucx.changes index 2e519a5..fe40666 100644 --- a/openucx.changes +++ b/openucx.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Feb 24 16:34:54 UTC 2021 - Nicolas Morey-Chaisemartin + +- Update openucx-s390x-support.patch to fix mmap syscall on s390x (bsc#1182691) + ------------------------------------------------------------------- Mon Oct 5 13:21:34 UTC 2020 - Nicolas Morey-Chaisemartin diff --git a/openucx.spec b/openucx.spec index 0b4b4e0..5734bd5 100644 --- a/openucx.spec +++ b/openucx.spec @@ -1,7 +1,7 @@ # # spec file for package openucx # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -154,7 +154,7 @@ export UCX_CFLAGS="$UCX_CFLAGS -mno-sse -mno-sse2" --disable-debug --disable-assertions \ --disable-params-check \ --with-rc --with-ud --with-dc \ - --with-mlx5-dv --with-rdmacm + --with-mlx5-dv --with-rdmacm # Override BASE_CFLAGS to disable Werror (boo#1121267) make %{?_smp_mflags} V=1 BASE_CFLAGS="-g -Wall"