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

Kerberos support for kernel >= 2.6.24 is broken

Details

    • Improvement
    • Resolution: Fixed
    • Blocker
    • Lustre 2.4.0
    • Lustre 2.3.0
    • Linux distributions running kernel >= 2.6.24

    Description

      Since kernel version 2.6.24 the scatterlist struct has no field "page".
      The related Lustre kerberos code in gss_krb5_mech.c is not working anymore,
      as for instance:

      static
      void buf_to_sg(struct scatterlist *sg, void *ptr, int len)
      {
      sg->page = virt_to_page(ptr);
      sg->offset = offset_in_page(ptr);
      sg->length = len;
      }

      access the field page in scatterlist struct.

      The new struct provided in the Linux kernel >= 2.6.24 is

      struct scatterlist {
      #ifdef CONFIG_DEBUG_SG
      unsigned long sg_magic;
      #endif
      unsigned long page_link;
      unsigned int offset;
      unsigned int length;
      dma_addr_t dma_address;
      unsigned int dma_length;
      };

      The problem can be fixed by using the scatterlist sg_set_page function, e.g:

      static
      void buf_to_sg(struct scatterlist *sg, void *ptr, int len)

      { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) + sg_set_page(sg, virt_to_page(ptr), + len, offset_in_page(ptr)); +#else sg->page = virt_to_page(ptr); sg->offset = offset_in_page(ptr); sg->length = len; +#endif }

      I will prepare a patch to fix this problem.

      Attachments

        Issue Links

          Activity

            [LU-2221] Kerberos support for kernel >= 2.6.24 is broken

            Good, then I will mark it as resolved and close it.

            yong.fan nasf (Inactive) added a comment - Good, then I will mark it as resolved and close it.

            Yes, the patches are also working for b2_3.

            thomas.stibor Thomas Stibor added a comment - Yes, the patches are also working for b2_3.

            Thomas, would you please to verify whether the patches works on your branch or not? Thanks!

            Since b2_3 is feature release, related fixes are landed to master (Lustre-2.4) already.

            yong.fan nasf (Inactive) added a comment - Thomas, would you please to verify whether the patches works on your branch or not? Thanks! Since b2_3 is feature release, related fixes are landed to master (Lustre-2.4) already.

            4394 has been landed to Lustre-2.4

            4379 still needs to be inspected.

            yong.fan nasf (Inactive) added a comment - 4394 has been landed to Lustre-2.4 4379 still needs to be inspected.
            yong.fan nasf (Inactive) added a comment - patches have been updated: For master: http://review.whamcloud.com/#change,4394,set5 For b2_3: http://review.whamcloud.com/#change,4379,set2
            pjones Peter Jones added a comment - http://review.whamcloud.com/#change,4379

            People

              yong.fan nasf (Inactive)
              thomas.stibor Thomas Stibor
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: