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

libcfs/util/ioctl.h unconditionally redefines __user

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Lustre 2.9.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      __user attribute is used by sparse to determine what data could and could not be accessed. libcfs/util/ioctl.h is actually incuded by quite a bit of lustre kernel code, not just userspace, so we should make the redefinition conditional.

      Attachments

        Activity

          [LU-8179] libcfs/util/ioctl.h unconditionally redefines __user

          patch has landed to master for 2.9.0

          jgmitter Joseph Gmitter (Inactive) added a comment - patch has landed to master for 2.9.0

          Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/20375/
          Subject: LU-8179 libcfs: Do not include libcfs/util/ioctl.h in kernel code
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 0ecdb18ea46790a21f35f60d452e8fc7a50ce838

          gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/20375/ Subject: LU-8179 libcfs: Do not include libcfs/util/ioctl.h in kernel code Project: fs/lustre-release Branch: master Current Patch Set: Commit: 0ecdb18ea46790a21f35f60d452e8fc7a50ce838

          libcfs/util/ioctl.h should never be used in kernel space. As you pointed out it is lustre_ioctl.h that is broken. I rather see lustre_ioctl.h fixed instead.

          As a side topic __user should be handled more cleaning for user space. The reason for this work around is currently the uapi headers are not exposed to the lustre user land code. Plus if I do that we can remove byteorder.h from libcfs.

          simmonsja James A Simmons added a comment - libcfs/util/ioctl.h should never be used in kernel space. As you pointed out it is lustre_ioctl.h that is broken. I rather see lustre_ioctl.h fixed instead. As a side topic __user should be handled more cleaning for user space. The reason for this work around is currently the uapi headers are not exposed to the lustre user land code. Plus if I do that we can remove byteorder.h from libcfs.

          Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: http://review.whamcloud.com/20375
          Subject: LU-8179 libcfs: Do not redefine __user for kernel code
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 3e9b1098bd32126bb68824214a3891c78f6bbe35

          gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: http://review.whamcloud.com/20375 Subject: LU-8179 libcfs: Do not redefine __user for kernel code Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 3e9b1098bd32126bb68824214a3891c78f6bbe35

          People

            wc-triage WC Triage
            green Oleg Drokin
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: