unionfs-fuse: upgrade 3.7 -> 3.8

License-Update: copyright year updated[1]

Dropped patch that are merged in the upstream version.

Changelog:
- fix data corruption when copying files larger than 8 MiB concurrently in
  cow mode
- fix "bad address" error when setting a debug file with unionfsctl -p
- fix creating unix sockets on macos
- mount.unionfs helper no longer requires bash and accepts multiple -o
  options

PTEST pass:
root@qemux86-64:~# ptest-runner unionfs-fuse
START: ptest-runner
2026-10-18T23:02
BEGIN: /usr/lib/unionfs-fuse/ptest
...
END: /usr/lib/unionfs-fuse/ptest
2026-10-18T23:02
STOP: ptest-runner
TOTAL: 1 FAIL: 0

[1]https://github.com/rpodgorny/unionfs-fuse/commit/e3e8b289f19047d7c6309eff3dc7a2c505229b73

Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
Ankur Tyagi authored and Khem Raj committed 2026-10-19 15:08:26 -07:00
1 parent 67b4387a4d
commit 0937ff2113
2 files changed
+2 -61

No files matched your search

@@ -1,58 +0,0 @@
From bf552c479a0c0b0ef2d52d8456030c56b8cc6dbb Mon Sep 17 00:00:00 2001
From: Gyorgy Sarvari <skandigraun@gmail.com>
Date: Fri, 26 Dec 2025 19:33:54 +0100
Subject: [PATCH] fix debug ioctl call
When calling the ioctl to set a debug file, the ioctl expects to receive a datatype
that is specified in the ioctl definition: char[PATHLEN_MAX]
However when passing the pointer from getopts, this is only true if the passed path
has the maximal allowed length. Since usually this path is shorter than the max,
the kernel is trying to read over the end of the argument, and returns "EFAULT/Bad address".
To solve this, copy the argument to a buffer that has the exact size of what the ioctl
expects, and pass this buffer to the ioctl.
Upstream-Status: Submitted [https://github.com/rpodgorny/unionfs-fuse/pull/164]
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
---
src/unionfsctl.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/unionfsctl.c b/src/unionfsctl.c
index 74c4d33..efed505 100644
--- a/src/unionfsctl.c
+++ b/src/unionfsctl.c
@@ -44,25 +44,28 @@ int main(int argc, char **argv) {
int opt;
const char* argument_param;
+ char debug_file[PATHLEN_MAX];
int debug_on_off;
int ioctl_res;
while ((opt = getopt(argc, argv, "d:p:")) != -1) {
switch (opt) {
case 'p':
- argument_param = optarg;
- if (strlen(argument_param) < 1) {
+ if (strlen(optarg) < 1) {
fprintf(stderr,
"Not a valid debug path given!\n");
print_help(progname);
exit(1);
}
- if (strlen(argument_param) > PATHLEN_MAX) {
+ if (strlen(optarg) > PATHLEN_MAX) {
fprintf(stderr, "Debug path too long!\n");
exit(1);
}
- ioctl_res = ioctl(fd, UNIONFS_SET_DEBUG_FILE, argument_param);
+ memset(debug_file, 0, PATHLEN_MAX);
+ strncpy(debug_file, optarg, PATHLEN_MAX - 1);
+
+ ioctl_res = ioctl(fd, UNIONFS_SET_DEBUG_FILE, debug_file);
if (ioctl_res == -1) {
fprintf(stderr, "debug-file ioctl failed: %s\n",
strerror(errno) );
@@ -3,16 +3,15 @@ HOMEPAGE = "https://github.com/rpodgorny/unionfs-fuse"
SECTION = "console/network"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://src/unionfs.c;beginline=3;endline=8;md5=30fa8de70fd8abab00b483a1b7943a32 \
file://LICENSE;md5=0e75c95b3e0e1c01489b39e7fadd3e2d \
file://LICENSE;md5=22a665a5eef3c10268acdee50e62d876 \
"
SRC_URI = "git://github.com/rpodgorny/${BPN}.git;branch=master;protocol=https;tag=v${PV} \
file://run-ptest \
file://0001-fix-debug-ioctl-call.patch \
file://0001-adapt-tests-to-ptest.patch \
"
SRCREV = "3fcbd11f78b9a9e02ea0e861d741840fe45dc9c8"
SRCREV = "e3e8b289f19047d7c6309eff3dc7a2c505229b73"
DEPENDS = "fuse3"
RDEPENDS:${PN} = "bash"