Files
linux/include/uapi/linux
GONG, Ruiqi 5538213436 capability: erase checker warnings about struct __user_cap_data_struct
Currently Sparse warns the following when compiling kernel/capability.c:

kernel/capability.c:191:35: warning: incorrect type in argument 2
                              (different address spaces)
kernel/capability.c:191:35:    expected void const *from
kernel/capability.c:191:35:    got struct __user_cap_data_struct
                                 [noderef] __user *
kernel/capability.c:168:14: warning: dereference of noderef expression
...... (multiple noderef warnings on different locations)
kernel/capability.c:244:29: warning: incorrect type in argument 1
                              (different address spaces)
kernel/capability.c:244:29:    expected void *to
kernel/capability.c:244:29:    got struct __user_cap_data_struct
                                 [noderef] __user ( * )[2]
kernel/capability.c:247:42: warning: dereference of noderef expression
...... (multiple noderef warnings on different locations)

It seems that defining `struct __user_cap_data_struct` together with
`cap_user_data_t` make Sparse believe that the struct is `noderef` as
well. Separate their definitions to clarify their respective attributes.

Signed-off-by: GONG, Ruiqi <gongruiqi@huaweicloud.com>
Acked-by: Serge Hallyn <serge@hallyn.com>
[PM: wrapped long lines in the description]
Signed-off-by: Paul Moore <paul@paul-moore.com>
2023-06-06 17:05:54 -04:00
..
2022-09-15 09:08:09 +02:00
2022-04-19 13:13:47 +01:00
2022-08-11 10:31:19 -07:00
2022-06-07 10:20:42 -07:00
2023-04-22 14:41:30 -07:00
2023-01-20 09:33:22 +00:00
2023-03-06 15:49:07 -06:00
2022-04-04 08:55:23 +02:00
2023-01-18 17:12:37 -08:00
2023-03-16 21:20:32 -07:00
2022-08-10 13:49:50 +01:00
2022-03-11 08:28:05 -08:00
2022-06-03 20:09:27 +08:00
2022-09-20 09:13:38 +02:00
2023-03-23 17:25:46 +01:00
2022-12-01 20:06:06 -08:00
2023-04-27 19:15:11 -06:00
2023-03-16 21:20:32 -07:00
2022-09-07 16:46:03 +02:00
2022-09-20 09:13:38 +02:00
2023-01-26 10:52:18 +01:00
2022-11-17 11:04:23 -08:00
2022-09-27 17:29:09 -07:00
2023-03-23 17:25:46 +01:00
2023-02-20 19:26:56 -05:00
2023-04-15 09:11:30 +01:00
2022-12-05 10:30:47 +01:00