liveupdate: Return -ENOTTY for unknown ioctl numbers
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | liveupdate: Return -ENOTTY for unknown ioctl numberskernel/ kernel/ | +2 | 1 reply | |
| 2/2 | selftests/liveupdate: Test ENOTTY for unknown ioctl numberstools/ | +35 | 1 reply |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Pratyush Yadav |
|---|---|
| 1/2 | R-b |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] liveupdate: Return -ENOTTY for unknown ioctl numbers
luo_ioctl() and luo_session_ioctl() return -EINVAL for a command number outside their ops table, but ENOTTY for an in-table number whose full command does not match. That contradicts the errno contract in include/uapi/linux/liveupdate.h, and it means a program cannot tell an ioctl the kernel does not have from a known ioctl with a bad argument. It also makes isatty() on a LUO fd fail with EINVAL instead of ENOTTY.
Patch 1 returns -ENOIOCTLCMD for out-of-range numbers too. Patch 2 adds a selftest for it.
Chris Down (2):
liveupdate: Return -ENOTTY for unknown ioctl numbers selftests/liveupdate: Test ENOTTY for unknown ioctl numbers
kernel/liveupdate/luo_core.c | 2 +- kernel/liveupdate/luo_session.c | 2 +- .../testing/selftests/liveupdate/liveupdate.c | 35 +++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-)
base-commit: ec459d99ed222228b3d601818fd1e24822a450d6
Signature · 1 line
2.56.1