diff options
author | 2022-04-13 22:12:46 -0700 | |
---|---|---|
committer | 2022-04-22 16:12:04 -0700 | |
commit | 26f89535a5bb17915a2e1062c3999a2ee797c7b0 (patch) | |
tree | c33eacd1c947648c140937688fd2c396d231ea96 /drivers/dma | |
parent | PM: CXL: Disable suspend (diff) | |
download | linux-26f89535a5bb17915a2e1062c3999a2ee797c7b0.tar.gz linux-26f89535a5bb17915a2e1062c3999a2ee797c7b0.tar.bz2 linux-26f89535a5bb17915a2e1062c3999a2ee797c7b0.zip |
cxl/mbox: Use type __u32 for mailbox payload sizes
Payload sizes for mailbox commands are expected to be positive values
coming from userspace. The documentation correctly describes these as
always unsigned values. The mailbox and send structures that support
the mailbox commands however, use __s32 types for the payloads.
Replace __s32 with __u32 in the mailbox and send command structures
and update usages.
Kernel users of the interface already block all negative values and
there is no known ability for userspace to have grown a dependency on
submitting negative values to the kernel. The known user of the IOCTL,
the CXL command line interface (cxl-cli) already enforces positive
size values.
A Smatch warning of a signedness uncovered this issue.
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Link: https://lore.kernel.org/r/20220414051246.1244575-1-alison.schofield@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma')
0 files changed, 0 insertions, 0 deletions