Fix TIOCGPTPEER ioctl definition
Subsystems (8)
PATCH 1/1 Fix TIOCGPTPEER ioctl definition
This ioctl does nothing to justify an _IOC_READ or _IOC_WRITE flag because it doesn't copy anything from/to userspace to access the argument.
Fixes 54ebbfb16034 ("tty: add TIOCGPTPEER ioctl")
Signed-off-by Gleb Fotengauer-Malinovskiy <[email protected]>
Acked-by Aleksa Sarai <[email protected]>
Acked-by Arnd Bergmann <[email protected]>
--- arch/alpha/include/uapi/asm/ioctls.h | 2 +- arch/mips/include/uapi/asm/ioctls.h | 2 +- arch/parisc/include/uapi/asm/ioctls.h | 2 +- arch/powerpc/include/uapi/asm/ioctls.h | 2 +- arch/sh/include/uapi/asm/ioctls.h | 2 +- arch/sparc/include/uapi/asm/ioctls.h | 2 +- arch/xtensa/include/uapi/asm/ioctls.h | 2 +- include/uapi/asm-generic/ioctls.h | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-)
arch/alpha/include/uapi/asm/ioctls.h +1 -1
@@ -100,7 +100,7 @@#define TIOCGPKT _IOR('T', 0x38, int)/* Get packet mode state */ #define TIOCGPTLCK _IOR('T', 0x39, int)/* Get Pty lock state */ #define TIOCGEXCL _IOR('T', 0x40, int)/* Get exclusive mode state */ -#define TIOCGPTPEER _IOR('T', 0x41, int)/* Safely open the slave */ +#define TIOCGPTPEER _IO('T', 0x41)/* Safely open the slave */ #define TIOCSERCONFIG 0x5453#define TIOCSERGWILD 0x5454
arch/mips/include/uapi/asm/ioctls.h +1 -1
@@ -91,7 +91,7 @@#define TIOCGPKT _IOR('T', 0x38, int)/* Get packet mode state */ #define TIOCGPTLCK _IOR('T', 0x39, int)/* Get Pty lock state */ #define TIOCGEXCL _IOR('T', 0x40, int)/* Get exclusive mode state */ -#define TIOCGPTPEER _IOR('T', 0x41, int)/* Safely open the slave */ +#define TIOCGPTPEER _IO('T', 0x41)/* Safely open the slave */ /* I hope the range from 0x5480 on is free ... */ #define TIOCSCTTY 0x5480/* become controlling tty */
arch/parisc/include/uapi/asm/ioctls.h +1 -1
@@ -60,7 +60,7 @@#define TIOCGPKT _IOR('T', 0x38, int)/* Get packet mode state */ #define TIOCGPTLCK _IOR('T', 0x39, int)/* Get Pty lock state */ #define TIOCGEXCL _IOR('T', 0x40, int)/* Get exclusive mode state */ -#define TIOCGPTPEER _IOR('T', 0x41, int)/* Safely open the slave */ +#define TIOCGPTPEER _IO('T', 0x41)/* Safely open the slave */ #define FIONCLEX 0x5450/* these numbers need to be adjusted. */ #define FIOCLEX 0x5451
arch/powerpc/include/uapi/asm/ioctls.h +1 -1
@@ -100,7 +100,7 @@#define TIOCGPKT _IOR('T', 0x38, int)/* Get packet mode state */ #define TIOCGPTLCK _IOR('T', 0x39, int)/* Get Pty lock state */ #define TIOCGEXCL _IOR('T', 0x40, int)/* Get exclusive mode state */ -#define TIOCGPTPEER _IOR('T', 0x41, int)/* Safely open the slave */ +#define TIOCGPTPEER _IO('T', 0x41)/* Safely open the slave */ #define TIOCSERCONFIG 0x5453#define TIOCSERGWILD 0x5454
arch/sh/include/uapi/asm/ioctls.h +1 -1
@@ -93,7 +93,7 @@#define TIOCGPKT _IOR('T', 0x38, int)/* Get packet mode state */ #define TIOCGPTLCK _IOR('T', 0x39, int)/* Get Pty lock state */ #define TIOCGEXCL _IOR('T', 0x40, int)/* Get exclusive mode state */ -#define TIOCGPTPEER _IOR('T', 0x41, int)/* Safely open the slave */ +#define TIOCGPTPEER _IO('T', 0x41)/* Safely open the slave */ #define TIOCSERCONFIG _IO('T', 83)/* 0x5453 */ #define TIOCSERGWILD _IOR('T', 84, int)/* 0x5454 */
arch/sparc/include/uapi/asm/ioctls.h +1 -1
@@ -88,7 +88,7 @@#define TIOCGPTN _IOR('t', 134, unsigned int)/* Get Pty Number */ #define TIOCSPTLCK _IOW('t', 135, int)/* Lock/unlock PTY */ #define TIOCSIG _IOW('t', 136, int)/* Generate signal on Pty slave */ -#define TIOCGPTPEER _IOR('t', 137, int)/* Safely open the slave */ +#define TIOCGPTPEER _IO('t', 137)/* Safely open the slave */ /* Little f */ #define FIOCLEX _IO('f', 1)
arch/xtensa/include/uapi/asm/ioctls.h +1 -1
@@ -105,7 +105,7 @@#define TIOCGPKT _IOR('T', 0x38, int)/* Get packet mode state */ #define TIOCGPTLCK _IOR('T', 0x39, int)/* Get Pty lock state */ #define TIOCGEXCL _IOR('T', 0x40, int)/* Get exclusive mode state */ -#define TIOCGPTPEER _IOR('T', 0x41, int)/* Safely open the slave */ +#define TIOCGPTPEER _IO('T', 0x41)/* Safely open the slave */ #define TIOCSERCONFIG _IO('T', 83)#define TIOCSERGWILD _IOR('T', 84, int)
include/uapi/asm-generic/ioctls.h +1 -1
@@ -77,7 +77,7 @@#define TIOCGPKT _IOR('T', 0x38, int)/* Get packet mode state */ #define TIOCGPTLCK _IOR('T', 0x39, int)/* Get Pty lock state */ #define TIOCGEXCL _IOR('T', 0x40, int)/* Get exclusive mode state */ -#define TIOCGPTPEER _IOR('T', 0x41, int)/* Safely open the slave */ +#define TIOCGPTPEER _IO('T', 0x41)/* Safely open the slave */ #define FIONCLEX 0x5450#define FIOCLEX 0x5451
Signature · 1 line
glebfm
Quoted 8 lines · Gleb Fotengauer-Malinovskiy
This ioctl does nothing to justify an
_IOC_READor_IOC_WRITEflag because it doesn't copy anything from/to userspace to access the argument.Fixes 54ebbfb16034 ("tty: add TIOCGPTPEER ioctl")Signed-off-by Gleb Fotengauer-Malinovskiy <[email protected]>Acked-by Aleksa Sarai <[email protected]>Acked-by Arnd Bergmann <[email protected]>
Why the PING? -rc1 just happened, so I am only now able to apply the patch to the tree. Please relax, you are behind about 800+ other patches in my queue...
thanks,
greg k-h