[LU-8179] libcfs/util/ioctl.h unconditionally redefines __user Created: 22/May/16  Updated: 15/Jun/16  Resolved: 15/Jun/16

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.9.0

Type: Bug Priority: Major
Reporter: Oleg Drokin Assignee: WC Triage
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 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.



 Comments   
Comment by Gerrit Updater [ 22/May/16 ]

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

Comment by James A Simmons [ 23/May/16 ]

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.

Comment by Gerrit Updater [ 14/Jun/16 ]

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

Comment by Joseph Gmitter (Inactive) [ 15/Jun/16 ]

patch has landed to master for 2.9.0

Generated at Sat Feb 10 02:15:19 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.