staging: android: uapi: drop definitions of removed ION_IOC_{FREE,SHARE} ioctls
PATCH 1/1 staging: android: uapi: drop definitions of removed ION_IOC_{FREE,SHARE} ioctls
This problem was found by strace ioctl list generator.
--- drivers/staging/android/uapi/ion.h | 18 ------------------ 1 file changed, 18 deletions(-)
drivers/staging/android/uapi/ion.h +0 -18
@@ -131,24 +131,6 @@ struct ion_heap_query { struct ion_allocation_data)/** -* DOC: ION_IOC_FREE - free memory -* -* Takes an ion_handle_data struct and frees the handle. -*/ -#define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data) - -/** -* DOC: ION_IOC_SHARE - creates a file descriptor to use to share an allocation -* -* Takes an ion_fd_data struct with the handle field populated with a valid -* opaque handle. Returns the struct with the fd field set to a file -* descriptor open in the current address space. This file descriptor -* can then be passed to another process. The corresponding opaque handle can -* be retrieved via ION_IOC_IMPORT. -*/ -#define ION_IOC_SHARE _IOWR(ION_IOC_MAGIC, 4, struct ion_fd_data) - -/** * DOC: ION_IOC_HEAP_QUERY - information about available heaps * * Takes an ion_heap_query structure and populates information about
Signature · 1 line
glebfm
Quoted 28 lines · Gleb Fotengauer-Malinovskiy
This problem was found by strace ioctl list generator.
Fixes 15c6098cfec5 ("staging: android: ion: Remove ion_handle and ion_client")Signed-off-by Gleb Fotengauer-Malinovskiy <[email protected]>--- drivers/staging/android/uapi/ion.h | 18 ------------------ 1 file changed, 18 deletions(-)drivers/staging/android/uapi/ion.h +0
-11@@ -131,24 +131,6 @@ struct ion_heap_query { struct ion_allocation_data)/** -* DOC: ION_IOC_FREE - free memory -* -* Takes an ion_handle_data struct and frees the handle. -*/ -#define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data) - -/** -* DOC: ION_IOC_SHARE - creates a file descriptor to use to share an allocation -* -* Takes an ion_fd_data struct with the handle field populated with a valid -* opaque handle. Returns the struct with the fd field set to a file
drivers/staging/android/uapi/ion.h struct ion_heap_query { · line 136
Quoted 10 lines
drivers/staging/android/uapi/ion.h +0
-7-* descriptor open in the current address space. This file descriptor -* can then be passed to another process. The corresponding opaque handle can -* be retrieved via ION_IOC_IMPORT. -*/ -#define ION_IOC_SHARE _IOWR(ION_IOC_MAGIC, 4, struct ion_fd_data) - -/** * DOC: ION_IOC_HEAP_QUERY - information about available heaps * * Takes an ion_heap_query structure and populates information about
Quoted 4 lines · Laura Abbott
Quoted 3 lines · Gleb Fotengauer-Malinovskiy
This problem was found by strace ioctl list generator.
Fixes 15c6098cfec5 ("staging: android: ion: Remove ion_handle and ion_client")
As this commit fixes a regression, please apply it to the tree which will be merged before 4.12 release, too.
Otherwise the regression will be introduced to the release.
Signature · 1 line
glebfm
Greg Kroah-Hartman
maintainerQuoted 8 lines · Gleb Fotengauer-Malinovskiy
Quoted 4 lines · Laura Abbott
Quoted 3 lines · Gleb Fotengauer-Malinovskiy
This problem was found by strace ioctl list generator.
Fixes 15c6098cfec5 ("staging: android: ion: Remove ion_handle and ion_client")As this commit fixes a regression, please apply it to the tree which will be merged before 4.12 release, too.
What "regression" is there? The fact that a staging driver has a few spare ioctls floating around in a header file? How is that bad?
thanks,
greg k-h
Quoted 5 lines · Greg Kroah-Hartman
Quoted 4 lines · Gleb Fotengauer-Malinovskiy
Quoted 3 lines · Laura Abbott
Quoted 2 lines · Gleb Fotengauer-Malinovskiy
This problem was found by strace ioctl list generator.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Fixes 15c6098cfec5 ("staging: android: ion: Remove ion_handle and ion_client")As this commit fixes a regression, please apply it to the tree which will be merged before 4.12 release, too.
What "regression" is there? The fact that a staging driver has a few spare ioctls floating around in a header file? How is that bad?
I thought it was pretty obvious.
OK, here is a bit more detailed explanation.
There is an uapi header that after commit 15c6098cfec5 provides definitions of ioctl macros that do not compile when used.
Imagine a userspace code that does something as harmless as
#ifdef ION_IOC_FREE use(ION_IOC_FREE);
#endif
This simple code is broken by commit 15c6098cfec5.
The regression is not a pure virtual one, there is a quite real userspace (strace ioctl list generator) broken by the change.
Signature · 1 line
ldv