Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel Module build failure on Fedora CoreOS 411.36.202211041039-0 / 6.0.5-200.fc36.x86_64 #49

Open
netwarex opened this issue Nov 10, 2022 · 2 comments

Comments

@netwarex
Copy link

netwarex commented Nov 10, 2022

Hi,

I trying to build the kernel module for OKD 4.11 (FCOS 36), but it fails. I using piraeus-operator for the installation, built my own image with fedora:36 following the guide in the piraeus repo.

I tried so far with v9.1.11, v9.2.0 and v9.2.1-rc.1

v9.1.11 had even more errors, so I think this issue occurs because of the kernel, probably it's too new.

FCOS Version: 411.36.202211041039-0
Kernel version: 6.0.5-200.fc36.x86_64

Could you please fix it, or guide me what to fix to make this build work?

Output of the build with v9.2.1-rc.1 (similar with v9.2.0):

Downloading: kernel-devel-6.0.5-200.fc36.x86_64.rpm
[==                                  ]   6% 1.00 MiB / 15.83 MiB
[====                                ]  12% 2.00 MiB / 15.83 MiB
[======                              ]  18% 3.00 MiB / 15.83 MiB
[=========                           ]  25% 4.00 MiB / 15.83 MiB
[===========                         ]  31% 5.00 MiB / 15.83 MiB
[=============                       ]  37% 6.00 MiB / 15.83 MiB
[===============                     ]  44% 7.00 MiB / 15.83 MiB
[==================                  ]  50% 8.00 MiB / 15.83 MiB
[====================                ]  56% 9.00 MiB / 15.83 MiB
[======================              ]  63% 10.00 MiB / 15.83 MiB
[=========================           ]  69% 11.00 MiB / 15.83 MiB
[===========================         ]  75% 12.00 MiB / 15.83 MiB
[=============================       ]  82% 13.00 MiB / 15.83 MiB
[===============================     ]  88% 14.00 MiB / 15.83 MiB
[==================================  ]  94% 15.00 MiB / 15.83 MiB
[====================================] 100% 15.83 MiB / 15.83 MiB
142424 blocks
Need a git checkout to regenerate drbd/.drbd_git_revision
make[1]: Entering directory '/tmp/pkg/drbd-9.2.1-rc.1/drbd'

    Calling toplevel makefile of kernel source tree, which I believe is in
    KDIR=/opt/usr/src/kernels/6.0.5-200.fc36.x86_64

make -C /opt/usr/src/kernels/6.0.5-200.fc36.x86_64   M=/tmp/pkg/drbd-9.2.1-rc.1/drbd  modules
  COMPAT  __vmalloc_has_2_params
  COMPAT  add_disk_returns_int
  COMPAT  before_4_13_kernel_read
  COMPAT  bio_alloc_has_4_params
  COMPAT  blkdev_issue_discard_takes_flags
  COMPAT  blkdev_issue_zeroout_discard
  COMPAT  can_include_vermagic_h
  COMPAT  dax_direct_access_takes_mode
  COMPAT  fs_dax_get_by_bdev_takes_start_off
  COMPAT  genl_policy_in_ops
  COMPAT  have_BIO_MAX_VECS
  COMPAT  have_CRYPTO_TFM_NEED_KEY
  COMPAT  have_GENHD_FL_NO_PART
  COMPAT  have_SHASH_DESC_ON_STACK
  COMPAT  have_WB_congested_enum
  COMPAT  have_allow_kernel_signal
  COMPAT  have_bdev_discard_granularity
  COMPAT  have_bdev_max_discard_sectors
  COMPAT  have_bdev_nr_sectors
  COMPAT  have_bdevname
  COMPAT  have_bdgrab
  COMPAT  have_bdi_congested
  COMPAT  have_bdi_congested_fn
  COMPAT  have_bio_alloc_clone
  COMPAT  have_bio_bi_bdev
  COMPAT  have_bio_bi_error
  COMPAT  have_bio_bi_opf
  COMPAT  have_bio_bi_status
  COMPAT  have_bio_clone_fast
  COMPAT  have_bio_op_shift
  COMPAT  have_bio_set_dev
  COMPAT  have_bio_set_op_attrs
  COMPAT  have_bio_start_io_acct
  COMPAT  have_bioset_init
  COMPAT  have_bioset_need_bvecs
  COMPAT  have_blk_alloc_disk
  COMPAT  have_blk_alloc_queue_rh
  COMPAT  have_blk_check_plugged
  COMPAT  have_blk_cleanup_disk
  COMPAT  have_blk_qc_t_make_request
  COMPAT  have_blk_qc_t_submit_bio
  COMPAT  have_blk_queue_flag_set
  COMPAT  have_blk_queue_make_request
  COMPAT  have_blk_queue_max_write_same_sectors
  COMPAT  have_blk_queue_merge_bvec
  COMPAT  have_blk_queue_split_bio
  COMPAT  have_blk_queue_split_q_bio
  COMPAT  have_blk_queue_split_q_bio_bioset
  COMPAT  have_blk_queue_update_readahead
  COMPAT  have_blk_queue_write_cache
  COMPAT  have_bvec_kmap_local
  COMPAT  have_d_inode
  COMPAT  have_disk_update_readahead
  COMPAT  have_fallthrough
  COMPAT  have_fs_dax_get_by_bdev
  COMPAT  have_generic_start_io_acct_q_rw_sect_part
  COMPAT  have_generic_start_io_acct_rw_sect_part
  COMPAT  have_hd_struct
  COMPAT  have_ib_cq_init_attr
  COMPAT  have_ib_get_dma_mr
  COMPAT  have_idr_is_empty
  COMPAT  have_inode_lock
  COMPAT  have_ktime_to_timespec64
  COMPAT  have_kvfree
  COMPAT  have_kvfree_rcu
  COMPAT  have_list_is_first
  COMPAT  have_max_send_recv_sge
  COMPAT  have_nla_nest_start_noflag
  COMPAT  have_nla_parse_deprecated
  COMPAT  have_nla_put_64bit
  COMPAT  have_nla_strscpy
  COMPAT  have_part_stat_h
  COMPAT  have_part_stat_read_accum
  COMPAT  have_pointer_backing_dev_info
  COMPAT  have_proc_create_single
  COMPAT  have_queue_flag_discard
  COMPAT  have_queue_flag_stable_writes
  COMPAT  have_rb_declare_callbacks_max
  COMPAT  have_refcount_inc
  COMPAT  have_req_hardbarrier
  COMPAT  have_req_noidle
  COMPAT  have_req_nounmap
  COMPAT  have_req_op_write
  COMPAT  have_req_op_write_zeroes
  COMPAT  have_req_write
  COMPAT  have_revalidate_disk_size
  COMPAT  have_sched_set_fifo
  COMPAT  have_security_netlink_recv
  COMPAT  have_sendpage_ok
  COMPAT  have_set_capacity_and_notify
  COMPAT  have_shash_desc_zero
  COMPAT  have_simple_positive
  COMPAT  have_sock_set_keepalive
  COMPAT  have_strscpy
  COMPAT  have_struct_bvec_iter
  COMPAT  have_struct_size
  COMPAT  have_submit_bio_noacct
  COMPAT  have_tcp_sock_set_cork
  COMPAT  have_tcp_sock_set_nodelay
  COMPAT  have_tcp_sock_set_quickack
  COMPAT  have_time64_to_tm
  COMPAT  have_timer_setup
  COMPAT  have_void_make_request
  COMPAT  have_void_submit_bio
  COMPAT  ib_alloc_pd_has_2_params
  COMPAT  ib_device_has_ops
  COMPAT  ib_post_send_const_params
  COMPAT  ib_query_device_has_3_params
  COMPAT  need_drbd_wrappers
  COMPAT  need_make_request_recursion
  COMPAT  need_skb_abort_seq_read
  COMPAT  part_stat_read_takes_block_device
  COMPAT  queue_limits_has_discard_zeroes_data
  COMPAT  rdma_create_id_has_net_ns
  COMPAT  rdma_reject_has_reason_arg
  COMPAT  sk_data_ready_has_1_param
  COMPAT  sock_create_kern_has_netns_parameter
  COMPAT  sock_ops_returns_addr_len
  COMPAT  struct_gendisk_has_backing_dev_info
  UPD     /tmp/pkg/drbd-9.2.1-rc.1/drbd/compat.6.0.5-200.fc36.x86_64.h
  UPD     /tmp/pkg/drbd-9.2.1-rc.1/drbd/compat.h
  GENPATCHNAMES   6.0.5-200.fc36.x86_64
  SPATCH   3eb6d1043e5e57694ddd4b1222e73336  6.0.5-200.fc36.x86_64
  PATCH
patching file drbd_sender.c
patching file drbd_req.c
patching file drbd_receiver.c
patching file drbd_nl.c
patching file drbd_main.c
patching file drbd_debugfs.c
patching file drbd_dax_pmem.c
  CC [M]  /tmp/pkg/drbd-9.2.1-rc.1/drbd/drbd_dax_pmem.o
/tmp/pkg/drbd-9.2.1-rc.1/drbd/drbd_dax_pmem.c: In function 'drbd_dax_open':
/tmp/pkg/drbd-9.2.1-rc.1/drbd/drbd_dax_pmem.c:62:19: error: too few arguments to function 'fs_dax_get_by_bdev'
   62 |         dax_dev = fs_dax_get_by_bdev(bdev->md_bdev);
      |                   ^~~~~~~~~~~~~~~~~~
In file included from /tmp/pkg/drbd-9.2.1-rc.1/drbd/drbd_dax_pmem.c:24:
./include/linux/dax.h:134:20: note: declared here
  134 | struct dax_device *fs_dax_get_by_bdev(struct block_device *bdev, u64 *start_off,
      |                    ^~~~~~~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:249: /tmp/pkg/drbd-9.2.1-rc.1/drbd/drbd_dax_pmem.o] Error 1
make[2]: *** [Makefile:1856: /tmp/pkg/drbd-9.2.1-rc.1/drbd] Error 2
make[1]: Leaving directory '/tmp/pkg/drbd-9.2.1-rc.1/drbd'
make[1]: *** [Makefile:134: kbuild] Error 2
make: *** [Makefile:126: module] Error 2

Could not find the expexted *.ko, see stderr for more details

Thanks!

@netwarex
Copy link
Author

Was able to fix it locally the building by removing the fs_dax_get_by_bdev__no_takes_start_off.cocci from the patch list, and change drbd_dax_pmem.c filling the two new params.

int drbd_dax_open(struct drbd_backing_dev *bdev)
{
// ...
        dax_dev = fs_dax_get_by_bdev(bdev->md_bdev, &part_off, NULL, NULL);
// ...
}

However I'm not sure how to create a patch properly on that, and also not sure if this changes any behaviour of DRBD.

@SaigyoujiYuyuko233
Copy link

Same problem when build drbd. I found out that only branch drbd-9.1 (default) does not have this problem.
I'm using Fedora37 w/ kernel 6.0.12-200.fc36.x86_64.

BTW, I'm trying to build the rpm package for drbd. The rpm package require the script /usr/sbin/weak-modules but it is no found in kmod.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants