Open Lathanderjk opened 1 year ago
What is this kernel version("5.15.0-5.76.5.1.el8uek.x86_64") ? This seems custom kernel. We support only mainline kernel version.
RHEL based kernel.
Okay, But ksmbd is using KERNEL_VERSION macro to distinguish each kernel versions. When I see "5.15.0-5.76.5.1.el8uek.x86_64" name, he doesn't update PATCHLEVEL and SUBLEVEL in Makefile of kernel.
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) || \
(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 52) && LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0))
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
vfsuid = make_vfsuid(mnt_userns, &init_user_ns, pace->e_uid);
#else
kuid = mapped_kuid_fs(mnt_userns, &init_user_ns, pace->e_uid);
#endif
#else
kuid = kuid_into_mnt(mnt_userns, pace->e_uid);
#endif
See Makefile in mainline kernel. They should check them in Makefile of their kernel.
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 15
SUBLEVEL = 47
EXTRAVERSION =
NAME = Trick or Treat
Maybe @zx2c4 can help. These enterprise kernel are "special"
Problem persist and looks like there is same problem on default RHEL9 kernel 5.14.0-284.25.1.0.1.el9_2.x86_64
Even on kernel 6.4.9-1.el8.elrepo.x86_64 from elrepo build fails, incompatible with recent kernels?
In
file included from /root/ksmbd/vfs.h:17,
from /root/ksmbd/vfs_cache.h:16,
from /root/ksmbd/glob.h:13,
from /root/ksmbd/unicode.c:12:
/root/ksmbd/smbacl.h: In function ‘posix_acl_uid_translate’:
/root/ksmbd/smbacl.h:231:23: error: passing argument 1 of ‘make_vfsuid’ from incompatible pointer type [-Werror=incompatible-pointer-types]
vfsuid = make_vfsuid(mnt_userns, &init_user_ns, pace->e_uid);
^~~~~~
In file included from ./include/linux/fs.h:44,
from /root/ksmbd/unicode.c:9:
./include/linux/mnt_idmapping.h:118:40: note: expected ‘struct mnt_idmap ’ but argument is of type ‘struct user_namespace ’
vfsuid_t make_vfsuid(struct mnt_idmap *idmap,
In file included from /root/ksmbd/vfs.h:17,
from /root/ksmbd/vfs_cache.h:16,
from /root/ksmbd/glob.h:13,
from /root/ksmbd/unicode.c:12:
/root/ksmbd/smbacl.h: In function ‘posix_acl_gid_translate’:
/root/ksmbd/smbacl.h:264:23: error: passing argument 1 of ‘make_vfsgid’ from incompatible pointer type [-Werror=incompatible-pointer-types]
vfsgid = make_vfsgid(mnt_userns, &init_user_ns, pace->e_gid);
^~~~~~~~~~
In file included from ./include/linux/fs.h:44,
from /root/ksmbd/unicode.c:9:
./include/linux/mnt_idmapping.h:121:40: note: expected ‘struct mnt_idmap *’ but argument is of type ‘struct user_namespace *’
vfsgid_t make_vfsgid(struct mnt_idmap *idmap,
~~~~~~~~~~~~~~~~~~^~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:252: /root/ksmbd/unicode.o] Error 1
make[1]: *** [Makefile:2032: /root/ksmbd] Error 2
make[1]: Leaving directory '/usr/src/kernels/6.4.9-1.el8.elrepo.x86_64'`
Kernel uek R6 and also kernel-lt(5.4.252-1.el8.elrepo.x86_64) works fine.
Still an issue?
There is no problem compiling for Oracle kernel-uek R6 (based on upstream 5.4) but on R7 ( 5.15, gcc 11) it`s throwing error