LinuxSMB3 build backport

From SambaWiki
Revision as of 03:30, 29 October 2018 by Ligefei (talk | contribs) (fix typo in "make C=1 -C /usr/src/Linux-headers-`uname-r` M=`pwd` modules")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

To view the list of patches which are included in the backports, see

To build the current (all relevant patches to cifs.ko that are accepted in mainline Linux, ie all CIFS/SMB3 fixes and features except those that are the result of global changes to the kernel or the VFS interface) cifs.ko:

[verify which branch you want to check out, which kernel you are trying to build]

  • cat /proc/version (to see what kernel you are running)

[if you do not have the kernel headers installed they can be downloaded e.g. from;O=D]

  • git branch (to see the cifs backport branches, currently 4.9 through 4.15)
  • git checkout 4.11-full-backport (as an example if you were trying to build for 4.11 kernel)

[verify that you are booted to a matching kernel version, in this case some version of 4.11 e.g. cat /proc/version]

  • cd fs/cifs
  • make C=1 -C /usr/src/linux-headers-`uname -r` M=`pwd` modules
  • sudo modprobe cifs (if needed, e.g. to load any required loadable module dependencies for cifs.ko)
  • sudo rmmod cifs
  • sudo insmod ./cifs.ko (to load the module built a few steps above)
  • Enjoy ... (and test ... let us know on the mailing list if any problems)