commit fuzzel for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package fuzzel for openSUSE:Factory checked in at 2023-10-29 19:41:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fuzzel (Old) and /work/SRC/openSUSE:Factory/.fuzzel.new.17445 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "fuzzel" Sun Oct 29 19:41:53 2023 rev:10 rq:1120976 version:1.9.2 Changes: -------- --- /work/SRC/openSUSE:Factory/fuzzel/fuzzel.changes 2023-07-14 15:36:17.066160600 +0200 +++ /work/SRC/openSUSE:Factory/.fuzzel.new.17445/fuzzel.changes 2023-10-29 19:42:19.944538280 +0100 @@ -1,0 +2,11 @@ +Sun Oct 22 10:57:04 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl> + +- Rename 0001-mfd-noexec-seal.patch to 0002-fix-breakage-mfd-noexec-seal.patch +- Add 0001-shm-create-mfd-noexec-seal.patch + +------------------------------------------------------------------- +Sun Oct 22 10:50:41 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl> + +- Add 0001-mfd-noexec-seal.patch + +------------------------------------------------------------------- New: ---- 0001-shm-create-mfd-noexec-seal.patch 0002-fix-breakage-mfd-noexec-seal.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fuzzel.spec ++++++ --- /var/tmp/diff_new_pack.uB8JL3/_old 2023-10-29 19:42:20.580561531 +0100 +++ /var/tmp/diff_new_pack.uB8JL3/_new 2023-10-29 19:42:20.584561678 +0100 @@ -24,6 +24,8 @@ Group: System/X11/Utilities URL: https://codeberg.org/dnkl/fuzzel Source: https://codeberg.org/dnkl/fuzzel/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +Patch1: https://codeberg.org/dnkl/fuzzel/commit/31bef7d63aa71df8bbb49c82eebeeed5fe61... +Patch2: https://codeberg.org/dnkl/fuzzel/commit/6e1afa2ec8b9c760e83c30c959b3ee78cd7c... BuildRequires: meson >= 0.58 BuildRequires: pkgconfig BuildRequires: python3 ++++++ 0001-shm-create-mfd-noexec-seal.patch ++++++ From 31bef7d63aa71df8bbb49c82eebeeed5fe615939 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= <daniel@ekloef.se> Date: Sun, 8 Oct 2023 11:07:11 +0200 Subject: [PATCH] shm: create memfd with MFD_NOEXEC_SEAL --- shm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/shm.c b/shm.c index ab63800..cff4c14 100644 --- a/shm.c +++ b/shm.c @@ -13,6 +13,12 @@ #include "log.h" #include "stride.h" +#if defined(MFD_NOEXEC_SEAL) + #define FUZZEL_MFD_FLAGS (MFD_CLOEXEC | MFD_ALLOW_SEALING | MFD_NOEXEC_SEAL) +#else + #define FUZZEL_MFD_FLAGS (MFD_CLOEXEC | MFD_ALLOW_SEALING) +#endif + static tll(struct buffer) buffers; static void @@ -69,7 +75,7 @@ shm_get_buffer(struct wl_shm *shm, int width, int height) /* Backing memory for SHM */ #if defined(MEMFD_CREATE) - pool_fd = memfd_create("fuzzel-wayland-shm-buffer-pool", MFD_CLOEXEC); + pool_fd = memfd_create("fuzzel-wayland-shm-buffer-pool", FUZZEL_MFD_FLAGS); #elif defined(__FreeBSD__) // memfd_create on FreeBSD 13 is SHM_ANON without sealing support pool_fd = shm_open(SHM_ANON, O_RDWR | O_CLOEXEC, 0600); ++++++ 0002-fix-breakage-mfd-noexec-seal.patch ++++++ From 6e1afa2ec8b9c760e83c30c959b3ee78cd7c6776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= <daniel@ekloef.se> Date: Fri, 13 Oct 2023 16:36:58 +0200 Subject: [PATCH] bar: wayland: shm: try with MFD_NOEXEC_SEAL first, then without MFD_NOEXEC_SEAL is only supported on kernels 6.3 and later. If we were compiled on linux >= 6.3, but run on linux < 6.3, we'd exit with an error, due to memfd_create() failing with EINVAL. This patch fixes the problem by first trying to call memfd_create() *with* MFD_NOEXEC_SEAL, and if that fails with EINVAL, we try again without it. --- shm.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/shm.c b/shm.c index cff4c14..9430764 100644 --- a/shm.c +++ b/shm.c @@ -1,7 +1,8 @@ #include "shm.h" -#include <unistd.h> #include <assert.h> +#include <errno.h> +#include <unistd.h> #include <sys/types.h> #include <sys/mman.h> @@ -13,10 +14,8 @@ #include "log.h" #include "stride.h" -#if defined(MFD_NOEXEC_SEAL) - #define FUZZEL_MFD_FLAGS (MFD_CLOEXEC | MFD_ALLOW_SEALING | MFD_NOEXEC_SEAL) -#else - #define FUZZEL_MFD_FLAGS (MFD_CLOEXEC | MFD_ALLOW_SEALING) +#if !defined(MFD_NOEXEC_SEAL) + #define MFD_NOEXEC_SEAL 0 #endif static tll(struct buffer) buffers; @@ -75,7 +74,19 @@ shm_get_buffer(struct wl_shm *shm, int width, int height) /* Backing memory for SHM */ #if defined(MEMFD_CREATE) - pool_fd = memfd_create("fuzzel-wayland-shm-buffer-pool", FUZZEL_MFD_FLAGS); + /* + * Older kernels reject MFD_NOEXEC_SEAL with EINVAL. Try first + * *with* it, and if that fails, try again *without* it. + */ + errno = 0; + pool_fd = memfd_create( + "fuzzel-wayland-shm-buffer-pool", + MFD_CLOEXEC | MFD_ALLOW_SEALING | MFD_NOEXEC_SEAL); + + if (pool_fd < 0 && errno == EINVAL) { + pool_fd = memfd_create( + "fuzzel-wayland-shm-buffer-pool", MFD_CLOEXEC | MFD_ALLOW_SEALING); + } #elif defined(__FreeBSD__) // memfd_create on FreeBSD 13 is SHM_ANON without sealing support pool_fd = shm_open(SHM_ANON, O_RDWR | O_CLOEXEC, 0600);
participants (1)
-
Source-Sync