Comments (13)
Hello.
could you please decribe how did you compile cifssrv module ?
And if you share your config file of linux kernel(4.8.5), It will helpful to know the reason of insmod fail.
Thanks.
from ksmbd.
I just put the source code of cifssrv to kernel_dir/fs, and add
source "fs/cifssrv/Kconfig"
to kernel_dir/fs/Kconfig, then select it as module by menuconfig and compile it.
I don't know why I can't post attachment now.
from ksmbd.
stranged.
I am preparing user manual document to port cifssrv to linux kernel.
I will share if it is ready.
And have you worked second step ?
- cp -ar cifssrv kernel_dir/fs/
- add "obj-$(CONFIG_CIFS_SERVER) += cifssrv/" in fs/Makefile.
- add "source "fs/cifssrv/Kconfig"" in fs/Kconfig.
Thanks.
from ksmbd.
With the second step, I met this error.
`
fs/cifssrv/smb1pdu.c:2888:37: warning: 'struct posix_acl_xattr_entry' declared inside parameter list will not be visible outside of this definition or declaration
static void cifs_convert_ace(struct posix_acl_xattr_entry *ace,
^~~~~~~~~~~~~~~~~~~~~
fs/cifssrv/smb1pdu.c: In function 'cifs_convert_ace':
fs/cifssrv/smb1pdu.c:2896:5: error: dereferencing pointer to incomplete type 'struct posix_acl_xattr_entry'
ace->e_perm = cpu_to_le16(cifs_ace->cifs_e_perm);
^~
fs/cifssrv/smb1pdu.c: In function 'cifs_copy_posix_acl':
fs/cifssrv/smb1pdu.c:2960:10: error: invalid use of undefined type 'struct posix_acl_xattr_header'
struct posix_acl_xattr_entry *ace = (void *)(local_acl + 1);
^~~~~~~~~~~~~~~~~~~~~
fs/cifssrv/smb1pdu.c:2962:12: error: dereferencing pointer to incomplete type 'struct posix_acl_xattr_header'
local_acl->a_version = cpu_to_le32(POSIX_ACL_XATTR_VERSION);
^~
fs/cifssrv/smb1pdu.c:2965:4: error: invalid use of undefined type 'struct posix_acl_xattr_entry'
cifs_convert_ace(&ace[i], pACE);
^~~~~~~~~~~~~~~~
fs/cifssrv/smb1pdu.c:2965:25: error: dereferencing pointer to incomplete type 'struct posix_acl_xattr_entry'
cifs_convert_ace(&ace[i], pACE);
^
fs/cifssrv/smb1pdu.c: At top level:
fs/cifssrv/smb1pdu.c:2985:23: warning: 'struct posix_acl_xattr_entry' declared inside parameter list will not be visible outside of this definition or declaration
const struct posix_acl_xattr_entry *local_ace)
^~~~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/byteorder/little_endian.h:4:0,
from ./arch/x86/include/uapi/asm/byteorder.h:4,
from ./include/asm-generic/bitops/le.h:5,
from ./arch/x86/include/asm/bitops.h:504,
from ./include/linux/bitops.h:36,
from ./include/linux/kernel.h:10,
from ./include/linux/list.h:8,
from ./include/linux/wait.h:6,
from ./include/linux/fs.h:5,
from fs/cifssrv/smb1pdu.c:22:
fs/cifssrv/smb1pdu.c: In function 'convert_ace_to_cifs_ace':
fs/cifssrv/smb1pdu.c:2993:47: error: dereferencing pointer to incomplete type 'const struct posix_acl_xattr_entry'
cifs_ace->cifs_e_perm = le16_to_cpu(local_ace->e_perm);
^
./include/uapi/linux/byteorder/little_endian.h:35:51: note: in definition of macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
fs/cifssrv/smb1pdu.c:2993:26: note: in expansion of macro 'le16_to_cpu'
cifs_ace->cifs_e_perm = le16_to_cpu(local_ace->e_perm);
^~~~~~~~~~~
fs/cifssrv/smb1pdu.c: In function 'ACL_to_cifs_posix':
fs/cifssrv/smb1pdu.c:3022:9: error: invalid use of undefined type 'struct posix_acl_xattr_header'
struct posix_acl_xattr_entry *ace = (void *)(local_acl + 1);
^~~~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/byteorder/little_endian.h:4:0,
from ./arch/x86/include/uapi/asm/byteorder.h:4,
from ./include/asm-generic/bitops/le.h:5,
from ./arch/x86/include/asm/bitops.h:504,
from ./include/linux/bitops.h:36,
from ./include/linux/kernel.h:10,
from ./include/linux/list.h:8,
from ./include/linux/wait.h:6,
from ./include/linux/fs.h:5,
from fs/cifssrv/smb1pdu.c:22:
fs/cifssrv/smb1pdu.c:3034:40: error: dereferencing pointer to incomplete type 'struct posix_acl_xattr_header'
count, buflen, le32_to_cpu(local_acl->a_version));
^
./include/uapi/linux/byteorder/little_endian.h:33:51: note: in definition of macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
fs/cifssrv/smb1pdu.c:3033:2: note: in expansion of macro 'cifssrv_debug'
cifssrv_debug("setting acl with %d entries from buf of length %d and version of %d\n",
^~~~~~~~~~~~~
fs/cifssrv/smb1pdu.c:3053:3: error: invalid use of undefined type 'struct posix_acl_xattr_entry'
rc = convert_ace_to_cifs_ace(&cifs_acl->ace_array[i], &ace[i]);
^~
fs/cifssrv/smb1pdu.c:3053:61: error: dereferencing pointer to incomplete type 'struct posix_acl_xattr_entry'
rc = convert_ace_to_cifs_ace(&cifs_acl->ace_array[i], &ace[i]);
^
`
from ksmbd.
Okay, I made mistake to support 4.9 kernel...
So I am about to commit the patch to fix this issue in latest source.
can you try it after updating cifssrv source again ?
from ksmbd.
Yes I can.
from ksmbd.
It can be compiled with 4.8 kernel now, but not installed by 'make moduels_install'
from ksmbd.
Hi Kalel,
It can be compiled with 4.8 kernel now, but not installed by 'make moduels_install'
Can you elaborate more ? you are saying build failure ?
Thanks.
from ksmbd.
build successes.
but the .ko file was not auto copied to /lib/modules/..., which should be done by 'make moduels_install'.
from ksmbd.
Hm...
I could not reproduce this issue.
This is my result of make module_install.
linkinjeon@ubuntu-Samsung-DeskTop-System:~/linux/2016_1031/linux-next$ sudo make modules_install
[sudo] password for linkinjeon:
scripts/kconfig/conf --silentoldconfig Kconfig
INSTALL arch/x86/platform/intel/iosf_mbi.ko
INSTALL crypto/sha512_generic.ko
INSTALL drivers/hid/hid-wiimote.ko
INSTALL drivers/hid/wacom.ko
INSTALL drivers/input/ff-memless.ko
INSTALL drivers/md/dm-flakey.ko
INSTALL drivers/misc/mei/mei-me.ko
INSTALL drivers/misc/mei/mei.ko
INSTALL drivers/scsi/scsi_debug.ko
INSTALL fs/cifssrv/cifssrv.ko
INSTALL fs/efivarfs/efivarfs.ko
INSTALL fs/xfs/xfs.ko
INSTALL lib/libcrc32c.ko
DEPMOD 4.9.0-rc2-next-20161028-dirty
linkinjeon@ubuntu-Samsung-DeskTop-System:~/linux/2016_1031/linux-next$ ls /lib/modules/4.9.0-rc2-next-20161028-dirty/kernel/fs/cifssrv/cifssrv.ko
/lib/modules/4.9.0-rc2-next-20161028-dirty/kernel/fs/cifssrv/cifssrv.ko
can you share your build log when doing a command ?
Thanks.
from ksmbd.
I did it again with the latest 54df643 and kernel 4.8.11 . Everythings go well :-) .
Maybe I did somethings wrong last time. my bad, sorry
from ksmbd.
And I share user manual (https://github.com/namjaejeon/Documents/blob/master/CIFSSRV_User_Guide_v1.0.pdf)
you can reference how to port cifssrv in kernel from this document.
from ksmbd.
from ksmbd.
Related Issues (20)
- A ksmbd_work without SMB2_FLAGS_ASYNC_COMMAND needs call "cancel_fn" in "smb2_cancel"? HOT 2
- Windows client takes a long time to run .exe/.msi HOT 4
- Work's aux_payload cause error if the read command rap in middle of chained-compounded response HOT 20
- del dir err HOT 4
- Regression when under load HOT 18
- it can supported Kerberos Auth?
- Does it support external Kerberos KDC certification?
- The oplock feature will cause right-click attributes to freeze. HOT 14
- Mountoptions on clientside to host a linux userhome - mount 'dev', 'exec' HOT 2
- Session not destroy correctly? HOT 16
- RDMA Doesn't Work When Windows Client Connected HOT 13
- Can not see any file in the directory via smb when the directory is a mount point, but the files indeed exist. HOT 33
- ksmb crash on linux 6.5.3-arch1-1 HOT 5
- ksmbd_vfs_kern_path_locked behaviour HOT 9
- Can't enable RDMA: Windows 11 Pro client to ksmbd server HOT 7
- I have to usb smb1 protocol, is it unsafe? HOT 1
- can't listen ipv4 address HOT 11
- Possible recursive locking warning reported by lockdep HOT 6
- SMB Direct/RDMA: ksmbd failed to report InfiniBand interface as RDMA capable HOT 12
- ksmbd does not preserve supplementary groups HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ksmbd.