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

All structures referenced from IOCTLs need to be stable/checked for not changing

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      Lnux ioctl macoses _IOR _IOW are taking a struvture argument.
      That argument is then sized to determine the actual ioctl number.
      Should the structure change, actual ioctl number changes too without any visibility. If you only test with tools built against the same tree, you would never notice that much like what happens with same-version network testing.

      For network structures we have wirecheck/wiretest, I guess we need something similar for IOCTLs.
      The complication here is because structures used are actually somewhat different on different architectures, we might want to be a bit more smart about it,
      or we might need to have a per-architecture check.
      Alternatively we can just record the actual generated ioctl numbers and ensure thoe never change - then we'll catch other changes too, not just in structure sizes but when a type of the ioctl changes for example.

      Currently these include:
      From lustre_ioctl.h
      struct if_quotactl
      struct obd_ioctl_data
      mntopt_t

      From lustre_user.h:
      struct obd_statfs
      struct lu_fid
      struct ll_futimes_3
      struct hsm_user_state
      struct hsm_state_set
      struct hsm_state_set
      struct lustre_kernelcomm
      struct hsm_user_request
      struct lustre_swap_layouts
      struct hsm_current_action
      struct lmv_user_md
      struct hsm_user_import
      struct getparent
      struct lu_ladvise << This one is going to change to llapi_something with an upcoming patch.

      Attachments

        Issue Links

          Activity

            [LU-8329] All structures referenced from IOCTLs need to be stable/checked for not changing

            Nathaniel Clark (nathaniel.l.clark@intel.com) uploaded a new patch: https://review.whamcloud.com/31637
            Subject: LU-8329 wiretest: Add ioctl struct definitions
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 214802bc804cbf4f85e7a48c834572cad47f58da

            gerrit Gerrit Updater added a comment - Nathaniel Clark (nathaniel.l.clark@intel.com) uploaded a new patch: https://review.whamcloud.com/31637 Subject: LU-8329 wiretest: Add ioctl struct definitions Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 214802bc804cbf4f85e7a48c834572cad47f58da

            People

              utopiabound Nathaniel Clark
              green Oleg Drokin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: