Since 4.17.0, kernel cannot call syscalls directly because the calling convention can be different on x86_64, as explained in this email: https://lore.kernel.org/lkml/20180325162527.GA17492@light.dominikbrodowski.net Use the ksys_* alternatives instead when possible, or for readlink use do_readlinkat (and use readlinkat all the time to simplify ifdefs) It might be possible to change some of these without ifdefs, but for example ksys_unshare only got introduced in 4.17 so we need to keep some syscall calling... Change-Id: Ic47e184b29ef8b21731b2eae6193b0af2548b872