[LU-13783] Support for linux kernel version 5.8 Created: 14/Jul/20 Updated: 05/Jul/22 Resolved: 11/Jun/22 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.16.0 |
| Type: | Task | Priority: | Minor |
| Reporter: | Neil Brown | Assignee: | Neil Brown |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||||||||||||||||||||||
| Description |
|
Now that Linux 5.8 is in the stablization phase it makes sense to support compiling against it. There are several changes that we need to adjust for. Some are easy, some require more work. Linux 5.8:
Also:
|
| Comments |
| Comment by Gerrit Updater [ 12/Sep/20 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39260/ |
| Comment by Gerrit Updater [ 19/Oct/20 ] |
|
Neil Brown (neilb@suse.de) uploaded a new patch: https://review.whamcloud.com/40287 |
| Comment by Gerrit Updater [ 19/Oct/20 ] |
|
Neil Brown (neilb@suse.de) uploaded a new patch: https://review.whamcloud.com/40288 |
| Comment by Gerrit Updater [ 21/Oct/20 ] |
|
Neil Brown (neilb@suse.de) uploaded a new patch: https://review.whamcloud.com/40327 |
| Comment by Gerrit Updater [ 21/Oct/20 ] |
|
Neil Brown (neilb@suse.de) uploaded a new patch: https://review.whamcloud.com/40328 |
| Comment by Gerrit Updater [ 23/Oct/20 ] |
|
Neil Brown (neilb@suse.de) uploaded a new patch: https://review.whamcloud.com/40371 |
| Comment by Gerrit Updater [ 23/Oct/20 ] |
|
Neil Brown (neilb@suse.de) uploaded a new patch: https://review.whamcloud.com/40373 |
| Comment by Jian Yu [ 03/Nov/20 ] |
|
Hi Neil, CC [M] /root/lustre-release/lustre/obdclass/lprocfs_status.o
/root/lustre-release/lustre/obdclass/lprocfs_status.c: In function ‘lprocfs_add_simple’:
/root/lustre-release/lustre/obdclass/lprocfs_status.c:76:44: error: passing argument 4 of ‘proc_create_data’ from incompatible pointer type [-Werror=incompatible-pointer-types]
proc = proc_create_data(name, mode, root, fops, data);
^~~~
In file included from /root/lustre-release/lustre/include/lprocfs_status.h:42,
from /root/lustre-release/lustre/include/obd_support.h:43,
from /root/lustre-release/lustre/include/obd_class.h:36,
from /root/lustre-release/lustre/obdclass/lprocfs_status.c:39:
include/linux/proc_fs.h:102:31: note: expected ‘const struct proc_ops *’ but argument is of type ‘const struct file_operations *’
extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
^~~~~~~~~~~~~~~~
<~snip~>
/root/lustre-release/lustre/obdclass/lprocfs_status.c: At top level:
cc1: error: unrecognized command line option ‘-Wno-address-of-packed-member’ [-Werror]
cc1: all warnings being treated as errors
|
| Comment by Aurelien Degremont (Inactive) [ 10/Nov/20 ] |
|
Hi Jian Yu, I think you miss https://review.whamcloud.com/37873
|
| Comment by Jian Yu [ 11/Nov/20 ] |
|
Thank you, Aurelien. /root/lustre-release/lustre/ptlrpc/gss/gss_krb5_mech.c: In function ‘krb5_encrypt_bulk’:
/root/lustre-release/lustre/ptlrpc/gss/gss_krb5_mech.c:678:33: error: storage size of ‘ciph_desc’ isn’t known
struct blkcipher_desc ciph_desc;
^~~~~~~~~
/root/lustre-release/lustre/ptlrpc/gss/gss_krb5_mech.c:687:14: error: implicit declaration of function ‘crypto_blkcipher_blocksize’; did you mean ‘crypto_cipher_blocksize’? [-Werror=implicit-function-declaration]
blocksize = crypto_blkcipher_blocksize(tfm);
^~~~~~~~~~~~~~~~~~~~~~~~~~
crypto_cipher_blocksize
<~snip~>
ERROR: modpost: "kallsyms_lookup_name" [/root/lustre-release/lustre/llite/lustre.ko] undefined! ERROR: modpost: "kallsyms_lookup_name" [/root/lustre-release/libcfs/libcfs/libcfs.ko] undefined! |
| Comment by Gerrit Updater [ 26/Nov/20 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/40371/ |
| Comment by Gerrit Updater [ 30/Nov/20 ] |
|
(deleted, wrong ticket number) |
| Comment by Gerrit Updater [ 02/Dec/20 ] |
|
Neil Brown (neilb@suse.de) uploaded a new patch: https://review.whamcloud.com/40825 |
| Comment by Gerrit Updater [ 02/Dec/20 ] |
|
Neil Brown (neilb@suse.de) uploaded a new patch: https://review.whamcloud.com/40826 |
| Comment by Gerrit Updater [ 02/Dec/20 ] |
|
Neil Brown (neilb@suse.de) uploaded a new patch: https://review.whamcloud.com/40827 |
| Comment by Gerrit Updater [ 02/Dec/20 ] |
|
Neil Brown (neilb@suse.de) uploaded a new patch: https://review.whamcloud.com/40828 |
| Comment by Gerrit Updater [ 02/Dec/20 ] |
|
Neil Brown (neilb@suse.de) uploaded a new patch: https://review.whamcloud.com/40832 |
| Comment by Gerrit Updater [ 13/Dec/20 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/40825/ |
| Comment by Gerrit Updater [ 06/Jan/21 ] |
|
Jian Yu (yujian@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/41152 |
| Comment by Gerrit Updater [ 07/Jan/21 ] |
|
Jian Yu (yujian@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/41153 |
| Comment by Gerrit Updater [ 12/Jan/21 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/40287/ |
| Comment by Gerrit Updater [ 12/Jan/21 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41152/ |
| Comment by Gerrit Updater [ 26/Feb/21 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/40288/ |
| Comment by Gerrit Updater [ 10/Mar/21 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39259/ |
| Comment by Gerrit Updater [ 16/Mar/21 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/40328/ |
| Comment by Gerrit Updater [ 16/Mar/21 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/40832/ |
| Comment by Jian Yu [ 30/Mar/21 ] |
|
I tried to build Lustre client on the latest master branch (applied with an extra patch https://review.whamcloud.com/37873 for CC [M] /root/lustre-release/lnet/lnet/lib-socket.o
/root/lustre-release/lnet/lnet/lib-socket.c: In function ‘lnet_sock_listen’:
/root/lustre-release/lnet/lnet/lib-socket.c:363:2: error: implicit declaration of function ‘kernel_setsockopt’; did you mean ‘kernel_getsockname’? [-Werror=implicit-function-declaration]
363 | kernel_setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY,
| ^~~~~~~~~~~~~~~~~
| kernel_getsockname
cc1: all warnings being treated as errors
|
| Comment by Gerrit Updater [ 05/Apr/21 ] |
|
Jian Yu (yujian@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/43207 |
| Comment by Jian Yu [ 05/Apr/21 ] |
|
kallsyms_lookup_name() was unexported in kernel 5.8.0, which caused the following error while loading libcfs module: libcfs: Unknown symbol kallsyms_lookup_name (err -2) |
| Comment by Gerrit Updater [ 06/Apr/21 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/40826/ |
| Comment by Jian Yu [ 06/Apr/21 ] |
With the above patch merged, I tried to build the latest master branch with kernel 5.8.0 and hit the following errors: make[3]: Entering directory '/root/kernel/linux-5.8'
CC [M] /root/lustre-release/libcfs/libcfs/debug.o
In file included from /root/lustre-release/libcfs/include/libcfs/libcfs.h:44,
from /root/lustre-release/libcfs/libcfs/tracefile.h:36,
from /root/lustre-release/libcfs/libcfs/debug.c:47:
/root/lustre-release/libcfs/include/libcfs/linux/linux-misc.h:150:21: error: conflicting types for ‘kallsyms_lookup_name’
150 | static inline void *kallsyms_lookup_name(char *func)
| ^~~~~~~~~~~~~~~~~~~~
In file included from /root/lustre-release/libcfs/libcfs/debug.c:46:
include/linux/kallsyms.h:76:15: note: previous declaration of ‘kallsyms_lookup_name’ was here
76 | unsigned long kallsyms_lookup_name(const char *name);
| ^~~~~~~~~~~~~~~~~~~~
kallsyms_lookup_name() was defined in include/linux/kallsyms.h as follows: #ifdef CONFIG_KALLSYMS /* Lookup the address for a symbol. Returns 0 if not found. */ unsigned long kallsyms_lookup_name(const char *name); // ...... #else /* !CONFIG_KALLSYMS */ static inline unsigned long kallsyms_lookup_name(const char *name) { return 0; } |
| Comment by Jian Yu [ 06/Apr/21 ] |
|
More failures: CC [M] /root/lustre-release/lustre/llite/llite_lib.o
/root/lustre-release/lustre/llite/llite_lib.c: In function ‘ll_finish_md_op_data’:
/root/lustre-release/lustre/llite/llite_lib.c:3133:2: error: too many arguments to function ‘security_release_secctx’
3133 | security_release_secctx(op_data->op_file_secctx,
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/lustre-release/lustre/llite/llite_lib.c:51:
include/linux/security.h:574:6: note: declared here
574 | void security_release_secctx(struct lsmcontext *cp);
| ^~~~~~~~~~~~~~~~~~~~~~~
security_release_secctx() was declared in include/linux/security.h as follows: void security_release_secctx(struct lsmcontext *cp); |
| Comment by James A Simmons [ 06/Apr/21 ] |
|
I see what happened. It just wasn't exported in 5.6 but still was there. Now the kernel has the same work around upstream. I'm have a HWE Ubuntu laptop to work with. |
| Comment by Jian Yu [ 06/Apr/21 ] |
|
Hi James, With the latest master branch, I hit the following issues:
|
| Comment by James A Simmons [ 06/Apr/21 ] |
|
I like the term help |
| Comment by Jian Yu [ 06/Apr/21 ] |
|
Thank you, James. |
| Comment by James A Simmons [ 06/Apr/21 ] |
|
I fixed up the struct proc_ops. I'm not seeing the security_release_secctx breakage. I looked at the latest kernel and the protocol is not changed. kallsyms_lookup_name() is going to take me time to figure out. It stopped being exported in 5.6 but now it is an inline function in 5.8. |
| Comment by Jian Yu [ 12/Apr/21 ] |
|
Hi James,
The changes are introduced by linux-hwe-5.8 (5.8.0-22.23~20.04.1). I'm pushing a patch to fix this. |
| Comment by Gerrit Updater [ 12/Apr/21 ] |
|
Jian Yu (yujian@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/43284 |
| Comment by Jian Yu [ 12/Apr/21 ] |
Thank you, James. This is the remaining issue. |
| Comment by Jian Yu [ 12/Apr/21 ] |
|
Hi James, |
| Comment by Gerrit Updater [ 13/Apr/21 ] |
|
Jian Yu (yujian@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/43296 |
| Comment by Gerrit Updater [ 15/Apr/21 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/43207/ |
| Comment by James A Simmons [ 19/Apr/21 ] |
|
I started on the file allocation rework for osd-ldiskfs so we don't need to depend on osd_security_alloc(). I will need some time to get it working right. |
| Comment by Gerrit Updater [ 28/Apr/21 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/43296/ |
| Comment by Gerrit Updater [ 11/May/21 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/40827/ |
| Comment by Gerrit Updater [ 19/May/21 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/43284/ |
| Comment by James A Simmons [ 19/May/21 ] |
|
Moving the Linux client to 5.8 exposed a few more changes that Ubuntu 20 HWE didn't pick up. One is the change in rdma_reject() and the other is the removal of fscrypt_dummy_context_enabled(). See Linux commit ed318a6cc0b620440e65f48eb527dc3df7269ce4 for details.
|
| Comment by Gerrit Updater [ 25/May/21 ] |
|
Olaf Faaland-LLNL (faaland1@llnl.gov) uploaded a new patch: https://review.whamcloud.com/43778 |
| Comment by Gerrit Updater [ 27/May/21 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/40373/ |
| Comment by Peter Jones [ 27/May/21 ] |
|
It looks like everything has landed for 2.15 now. |
| Comment by James A Simmons [ 27/May/21 ] |
|
No their is more |
| Comment by Gerrit Updater [ 30/May/21 ] |
|
James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/43876 |
| Comment by Gerrit Updater [ 31/May/21 ] |
|
James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/43880 |
| Comment by Gerrit Updater [ 08/Jun/21 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/43880/ |
| Comment by Gerrit Updater [ 08/Jun/21 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/43778/ |
| Comment by James A Simmons [ 08/Jun/21 ] |
|
We still have the ldiskfs issue. |
| Comment by Gerrit Updater [ 26/Jun/21 ] |
|
James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/44087 |
| Comment by Gerrit Updater [ 10/Sep/21 ] |
|
"Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/44888 |
| Comment by Gerrit Updater [ 13/Oct/21 ] |
|
"James Simmons <jsimmons@infradead.org>" uploaded a new patch: https://review.whamcloud.com/45223 |
| Comment by Gerrit Updater [ 14/Nov/21 ] |
|
"Andreas Dilger <adilger@whamcloud.com>" merged in patch https://review.whamcloud.com/44888/ |
| Comment by Gerrit Updater [ 23/Dec/21 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/43876/ |
| Comment by James A Simmons [ 23/Dec/21 ] |
|
One patch left |
| Comment by Gerrit Updater [ 20/Jan/22 ] |
|
"James Simmons <jsimmons@infradead.org>" uploaded a new patch: https://review.whamcloud.com/46238 |
| Comment by Gerrit Updater [ 11/Jun/22 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/46238/ |
| Comment by James A Simmons [ 11/Jun/22 ] |
|
Work is completed. |
| Comment by Gerrit Updater [ 17/Jun/22 ] |
|
"Sebastien Buisson <sbuisson@ddn.com>" uploaded a new patch: https://review.whamcloud.com/47670 |
| Comment by Gerrit Updater [ 05/Jul/22 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/47670/ |