Giter Club home page Giter Club logo

Comments (13)

namjaejeon avatar namjaejeon commented on August 25, 2024

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.

KalelCooper avatar KalelCooper commented on August 25, 2024

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.

namjaejeon avatar namjaejeon commented on August 25, 2024

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 ?

  1. cp -ar cifssrv kernel_dir/fs/
  2. add "obj-$(CONFIG_CIFS_SERVER) += cifssrv/" in fs/Makefile.
  3. add "source "fs/cifssrv/Kconfig"" in fs/Kconfig.

Thanks.

from ksmbd.

KalelCooper avatar KalelCooper commented on August 25, 2024

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.

namjaejeon avatar namjaejeon commented on August 25, 2024

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.

KalelCooper avatar KalelCooper commented on August 25, 2024

Yes I can.

from ksmbd.

KalelCooper avatar KalelCooper commented on August 25, 2024

It can be compiled with 4.8 kernel now, but not installed by 'make moduels_install'

from ksmbd.

namjaejeon avatar namjaejeon commented on August 25, 2024

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.

KalelCooper avatar KalelCooper commented on August 25, 2024

build successes.
but the .ko file was not auto copied to /lib/modules/..., which should be done by 'make moduels_install'.

from ksmbd.

namjaejeon avatar namjaejeon commented on August 25, 2024

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.

KalelCooper avatar KalelCooper commented on August 25, 2024

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.

namjaejeon avatar namjaejeon commented on August 25, 2024

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.

KalelCooper avatar KalelCooper commented on August 25, 2024

from ksmbd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.