Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
3
-
13971
Description
Some recent landing in lustre master has broken the support for linux process namespace done in LU-4476. When building even client builds for rhel7 with CONFIG_UIDGID_STRICT_TYPE_CHECKS enabled (the default setting) there are many build errors. It looks like some new uid/gid calls were added without regard to the changes from LU-4476 that needed to be conformed to. I suspect the recent commit LU-1778 llite: fix inconsistencies of root squash feature is at fault.
example errors:
CC [M] /home/bogl/lustre-release/lustre/llite/file.o
In file included from include/uapi/linux/stddef.h:1:0,
from include/linux/stddef.h:4,
from /usr/src/kernels/3.10.0-123.el7.x86_64/include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/proc_fs.h:7,
from /home/bogl/lustre-release/lustre/include/linux/lustre_dlm.h:43,
from /home/bogl/lustre-release/lustre/include/lustre_dlm.h:52,
from /home/bogl/lustre-release/lustre/llite/file.c:44:
/home/bogl/lustre-release/lustre/llite/file.c: In function ‘ll_inode_permission’:
/home/bogl/lustre-release/lustre/llite/file.c:3545:24: error: invalid operands to binary == (have ‘kuid_t’ and ‘int’)
current_fsuid() == 0 &&
^
include/linux/compiler.h:153:42: note: in definition of macro ‘unlikely’
# define unlikely(x) __builtin_expect(!!(x), 0)
^
In file included from /home/bogl/lustre-release/libcfs/include/libcfs/libcfs.h:272:0,
from /home/bogl/lustre-release/lustre/include/lustre_lib.h:49,
from /home/bogl/lustre-release/lustre/include/lustre_dlm.h:61,
from /home/bogl/lustre-release/lustre/llite/file.c:44:
/home/bogl/lustre-release/libcfs/include/libcfs/libcfs_debug.h:225:23: error: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘kuid_t’ [-Werror=format=]
static struct libcfs_debug_msg_data msgdata; \
^
/home/bogl/lustre-release/libcfs/include/libcfs/libcfs_debug.h:235:35: note: in expansion of macro ‘__CDEBUG’
#define CDEBUG(mask, format, ...) __CDEBUG(NULL, mask, format, ## __VA_ARGS__)
^
/home/bogl/lustre-release/lustre/llite/file.c:3550:3: note: in expansion of macro ‘CDEBUG’
CDEBUG(D_OTHER, "squash creds (%d:%d)=>(%d:%d)\n",
^
/home/bogl/lustre-release/libcfs/include/libcfs/libcfs_debug.h:225:23: error: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘kgid_t’ [-Werror=format=]
static struct libcfs_debug_msg_data msgdata; \
^
/home/bogl/lustre-release/libcfs/include/libcfs/libcfs_debug.h:235:35: note: in expansion of macro ‘__CDEBUG’
#define CDEBUG(mask, format, ...) __CDEBUG(NULL, mask, format, ## __VA_ARGS__)
^
/home/bogl/lustre-release/lustre/llite/file.c:3550:3: note: in expansion of macro ‘CDEBUG’
CDEBUG(D_OTHER, "squash creds (%d:%d)=>(%d:%d)\n",
^
/home/bogl/lustre-release/lustre/llite/file.c:3560:15: error: incompatible types when assigning to type ‘kuid_t’ from type ‘uid_t’
cred->fsuid = squash->rsi_uid;
^
/home/bogl/lustre-release/lustre/llite/file.c:3561:15: error: incompatible types when assigning to type ‘kgid_t’ from type ‘gid_t’
cred->fsgid = squash->rsi_gid;
^
cc1: all warnings being treated as errors
make[6]: *** [/home/bogl/lustre-release/lustre/llite/file.o] Error 1
make[5]: *** [/home/bogl/lustre-release/lustre/llite] Error 2
make[4]: *** [/home/bogl/lustre-release/lustre] Error 2
make[3]: *** [_module_/home/bogl/lustre-release] Error 2
make[3]: Leaving directory `/usr/src/kernels/3.10.0-123.el7.x86_64'
make[2]: *** [modules] Error 2
make[2]: Leaving directory `/home/bogl/lustre-release'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/bogl/lustre-release'
make: *** [all] Error 2