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

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


    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Severity:
    • Rank (Obsolete):


      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

      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.


          Issue Links



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


                • Created: