Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-19907

Escaping bug in `dkms.conf` prevents `ko2iblnd` module from being installed when using external OFED

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Medium
    • None
    • Lustre 2.17.0
    • None
    • Debian 13 (trixie), kernel 6.12.73+deb13-amd64, DOCA-OFED 25.10.OFED.25.10.1.7.1.1
    • 3
    • 9223372036854775807

    Description

      In debian/dkms.conf.in, the following line attempts to extract the --with-o2ib= path from $OPTS by splitting on spaces:

      o2ib=$(echo ${OPTS} | tr ' ' '\\n' | grep -- '--with-o2ib=' | cut -c 13-)

      But the '
      n'
      argument to tr here is a literal backslash followed by n, not a newline character. As a result, tr replaces spaces with }} instead of newlines, causing {{grep to return the entire $OPTS string as a single token. The subsequent cut c 13 then strips only the first 12 characters of that blob, leaving a garbage value in o2ib instead of the intended path.

      Because [[ d $o2ib ]] then fails, ext_mofed remains no even when -with-o2ib=/usr/src/ofa_kernel/default is explicitly set, and ko2iblnd is never added to BUILT_MODULE_NAME. The module is compiled correctly but not installed by DKMS.

      Steps to reproduce:

      1. Build lustre-client-modules-dkms with --with-o2ib=/usr/src/ofa_kernel/default
      2. Install the resulting .deb
      3. Observe that ko2iblnd.ko is absent from /lib/modules/$(uname -r)/updates/kernel/net/lustre/

      An easy way to illustrate the problem is to run bash -x /var/lib/dkms/lustre-client-modules/<ver>/source/dkms.conf 2>&1 | grep ' o2ib=' to see the mangled value:

      • current state:
      $ bash -x /var/lib/dkms/lustre-client-modules/2.17.0/source/dkms.conf 2>&1 | grep ' o2ib='
      + o2ib='rver\--disable-quilt\--with-o2ib=/usr/src/ofa_kernel/default\--disable-dependency-tracking\--disable-doc\--disable-utils\--disable-iokit\--disable-tests\--enable-quota\--with-kmp-moddir=updates\--enable-gss'
      • after having replaced 
        n with
        n :
      $ bash -x /var/lib/dkms/lustre-client-modules/2.17.0/source/dkms.conf 2>&1 | grep ' o2ib='
      + o2ib=/usr/src/ofa_kernel/default

      Attachments

        Activity

          People

            wc-triage WC Triage
            kilian Kilian Cavalotti
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: