* [PATCH] tty: Fix TIOCGPTPEER ioctl definition
@ 2017-07-11 0:12 ` Gleb Fotengauer-Malinovskiy
0 siblings, 0 replies; 13+ messages in thread
From: Gleb Fotengauer-Malinovskiy @ 2017-07-11 0:12 UTC (permalink / raw)
To: Aleksa Sarai, Greg Kroah-Hartman
Cc: Jiri Slaby, Arnd Bergmann, Christian Brauner, Valentin Rothberg,
Dmitry V. Levin, linux-kernel, linux-alpha, linux-mips,
linux-parisc, linuxppc-dev, linux-sh, sparclinux, linux-xtensa,
linux-arch
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: 54ebbfb1 ("tty: add TIOCGPTPEER ioctl")
Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
---
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(-)
diff --git a/arch/alpha/include/uapi/asm/ioctls.h b/arch/alpha/include/uapi/asm/ioctls.h
index ff67b837..1cd7dc7 100644
--- a/arch/alpha/include/uapi/asm/ioctls.h
+++ b/arch/alpha/include/uapi/asm/ioctls.h
@@ -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
diff --git a/arch/mips/include/uapi/asm/ioctls.h b/arch/mips/include/uapi/asm/ioctls.h
index 68e19b6..1609cb0 100644
--- a/arch/mips/include/uapi/asm/ioctls.h
+++ b/arch/mips/include/uapi/asm/ioctls.h
@@ -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 */
diff --git a/arch/parisc/include/uapi/asm/ioctls.h b/arch/parisc/include/uapi/asm/ioctls.h
index 674c68a..d0e3321 100644
--- a/arch/parisc/include/uapi/asm/ioctls.h
+++ b/arch/parisc/include/uapi/asm/ioctls.h
@@ -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
diff --git a/arch/powerpc/include/uapi/asm/ioctls.h b/arch/powerpc/include/uapi/asm/ioctls.h
index bfd609a..e3b1046 100644
--- a/arch/powerpc/include/uapi/asm/ioctls.h
+++ b/arch/powerpc/include/uapi/asm/ioctls.h
@@ -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
diff --git a/arch/sh/include/uapi/asm/ioctls.h b/arch/sh/include/uapi/asm/ioctls.h
index eec7901..787bac9 100644
--- a/arch/sh/include/uapi/asm/ioctls.h
+++ b/arch/sh/include/uapi/asm/ioctls.h
@@ -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 */
diff --git a/arch/sparc/include/uapi/asm/ioctls.h b/arch/sparc/include/uapi/asm/ioctls.h
index 6d27398..f5df72b 100644
--- a/arch/sparc/include/uapi/asm/ioctls.h
+++ b/arch/sparc/include/uapi/asm/ioctls.h
@@ -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)
diff --git a/arch/xtensa/include/uapi/asm/ioctls.h b/arch/xtensa/include/uapi/asm/ioctls.h
index 98b004e..47d82c0 100644
--- a/arch/xtensa/include/uapi/asm/ioctls.h
+++ b/arch/xtensa/include/uapi/asm/ioctls.h
@@ -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)
diff --git a/include/uapi/asm-generic/ioctls.h b/include/uapi/asm-generic/ioctls.h
index 06d5f7d..14baf9f2 100644
--- a/include/uapi/asm-generic/ioctls.h
+++ b/include/uapi/asm-generic/ioctls.h
@@ -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
--
glebfm
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH] tty: Fix TIOCGPTPEER ioctl definition
@ 2017-07-11 0:12 ` Gleb Fotengauer-Malinovskiy
0 siblings, 0 replies; 13+ messages in thread
From: Gleb Fotengauer-Malinovskiy @ 2017-07-11 0:12 UTC (permalink / raw)
To: Aleksa Sarai, Greg Kroah-Hartman
Cc: Jiri Slaby, Arnd Bergmann, Christian Brauner, Valentin Rothberg,
Dmitry V. Levin, linux-kernel, linux-alpha, linux-mips,
linux-parisc, linuxppc-dev, linux-sh, sparclinux, linux-xtensa,
linux-arch
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: 54ebbfb1 ("tty: add TIOCGPTPEER ioctl")
Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
---
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(-)
diff --git a/arch/alpha/include/uapi/asm/ioctls.h b/arch/alpha/include/uapi/asm/ioctls.h
index ff67b837..1cd7dc7 100644
--- a/arch/alpha/include/uapi/asm/ioctls.h
+++ b/arch/alpha/include/uapi/asm/ioctls.h
@@ -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
diff --git a/arch/mips/include/uapi/asm/ioctls.h b/arch/mips/include/uapi/asm/ioctls.h
index 68e19b6..1609cb0 100644
--- a/arch/mips/include/uapi/asm/ioctls.h
+++ b/arch/mips/include/uapi/asm/ioctls.h
@@ -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 */
diff --git a/arch/parisc/include/uapi/asm/ioctls.h b/arch/parisc/include/uapi/asm/ioctls.h
index 674c68a..d0e3321 100644
--- a/arch/parisc/include/uapi/asm/ioctls.h
+++ b/arch/parisc/include/uapi/asm/ioctls.h
@@ -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
diff --git a/arch/powerpc/include/uapi/asm/ioctls.h b/arch/powerpc/include/uapi/asm/ioctls.h
index bfd609a..e3b1046 100644
--- a/arch/powerpc/include/uapi/asm/ioctls.h
+++ b/arch/powerpc/include/uapi/asm/ioctls.h
@@ -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
diff --git a/arch/sh/include/uapi/asm/ioctls.h b/arch/sh/include/uapi/asm/ioctls.h
index eec7901..787bac9 100644
--- a/arch/sh/include/uapi/asm/ioctls.h
+++ b/arch/sh/include/uapi/asm/ioctls.h
@@ -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 */
diff --git a/arch/sparc/include/uapi/asm/ioctls.h b/arch/sparc/include/uapi/asm/ioctls.h
index 6d27398..f5df72b 100644
--- a/arch/sparc/include/uapi/asm/ioctls.h
+++ b/arch/sparc/include/uapi/asm/ioctls.h
@@ -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)
diff --git a/arch/xtensa/include/uapi/asm/ioctls.h b/arch/xtensa/include/uapi/asm/ioctls.h
index 98b004e..47d82c0 100644
--- a/arch/xtensa/include/uapi/asm/ioctls.h
+++ b/arch/xtensa/include/uapi/asm/ioctls.h
@@ -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)
diff --git a/include/uapi/asm-generic/ioctls.h b/include/uapi/asm-generic/ioctls.h
index 06d5f7d..14baf9f2 100644
--- a/include/uapi/asm-generic/ioctls.h
+++ b/include/uapi/asm-generic/ioctls.h
@@ -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
--
glebfm
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH] tty: Fix TIOCGPTPEER ioctl definition
2017-07-11 0:12 ` Gleb Fotengauer-Malinovskiy
@ 2017-07-11 2:07 ` Aleksa Sarai
-1 siblings, 0 replies; 13+ messages in thread
From: Aleksa Sarai @ 2017-07-11 2:07 UTC (permalink / raw)
To: Gleb Fotengauer-Malinovskiy, Greg Kroah-Hartman
Cc: Jiri Slaby, Arnd Bergmann, Christian Brauner, Valentin Rothberg,
Dmitry V. Levin, linux-kernel, linux-alpha, linux-mips,
linux-parisc, linuxppc-dev, linux-sh, sparclinux, linux-xtensa,
linux-arch
> 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.
Acked-by: Aleksa Sarai <asarai@suse.de>
Oops, I misunderstood what _IOR means semantically. TIL -- thanks!
--
Aleksa Sarai
Software Engineer (Containers)
SUSE Linux GmbH
https://www.cyphar.com/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] tty: Fix TIOCGPTPEER ioctl definition
@ 2017-07-11 2:07 ` Aleksa Sarai
0 siblings, 0 replies; 13+ messages in thread
From: Aleksa Sarai @ 2017-07-11 2:07 UTC (permalink / raw)
To: Gleb Fotengauer-Malinovskiy, Greg Kroah-Hartman
Cc: Jiri Slaby, Arnd Bergmann, Christian Brauner, Valentin Rothberg,
Dmitry V. Levin, linux-kernel, linux-alpha, linux-mips,
linux-parisc, linuxppc-dev, linux-sh, sparclinux, linux-xtensa,
linux-arch
> 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.
Acked-by: Aleksa Sarai <asarai@suse.de>
Oops, I misunderstood what _IOR means semantically. TIL -- thanks!
--
Aleksa Sarai
Software Engineer (Containers)
SUSE Linux GmbH
https://www.cyphar.com/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] tty: Fix TIOCGPTPEER ioctl definition
2017-07-11 0:12 ` Gleb Fotengauer-Malinovskiy
@ 2017-07-11 7:30 ` Arnd Bergmann
-1 siblings, 0 replies; 13+ messages in thread
From: Arnd Bergmann @ 2017-07-11 7:30 UTC (permalink / raw)
To: Gleb Fotengauer-Malinovskiy
Cc: Aleksa Sarai, Greg Kroah-Hartman, Jiri Slaby, Christian Brauner,
Valentin Rothberg, Dmitry V. Levin, Linux Kernel Mailing List,
linux-alpha, open list:RALINK MIPS ARCHITECTURE, Parisc List,
linuxppc-dev, linux-sh, sparclinux, linux-xtensa, linux-arch
On Tue, Jul 11, 2017 at 2:12 AM, Gleb Fotengauer-Malinovskiy
<glebfm@altlinux.org> wrote:
> 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: 54ebbfb1 ("tty: add TIOCGPTPEER ioctl")
> Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] tty: Fix TIOCGPTPEER ioctl definition
@ 2017-07-11 7:30 ` Arnd Bergmann
0 siblings, 0 replies; 13+ messages in thread
From: Arnd Bergmann @ 2017-07-11 7:30 UTC (permalink / raw)
To: Gleb Fotengauer-Malinovskiy
Cc: Aleksa Sarai, Greg Kroah-Hartman, Jiri Slaby, Christian Brauner,
Valentin Rothberg, Dmitry V. Levin, Linux Kernel Mailing List,
linux-alpha, open list:RALINK MIPS ARCHITECTURE, Parisc List,
linuxppc-dev, linux-sh, sparclinux, linux-xtensa, linux-arch
On Tue, Jul 11, 2017 at 2:12 AM, Gleb Fotengauer-Malinovskiy
<glebfm@altlinux.org> wrote:
> 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: 54ebbfb1 ("tty: add TIOCGPTPEER ioctl")
> Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] tty: Fix TIOCGPTPEER ioctl definition
2017-07-11 0:12 ` Gleb Fotengauer-Malinovskiy
(?)
@ 2017-07-11 10:03 ` James Hogan
-1 siblings, 0 replies; 13+ messages in thread
From: James Hogan @ 2017-07-11 10:03 UTC (permalink / raw)
To: Gleb Fotengauer-Malinovskiy
Cc: Aleksa Sarai, Greg Kroah-Hartman, Jiri Slaby, Arnd Bergmann,
Christian Brauner, Valentin Rothberg, Dmitry V. Levin,
linux-kernel, linux-alpha, linux-mips, linux-parisc,
linuxppc-dev, linux-sh, sparclinux, linux-xtensa, linux-arch
[-- Attachment #1: Type: text/plain, Size: 6491 bytes --]
On Tue, Jul 11, 2017 at 03:12:17AM +0300, Gleb Fotengauer-Malinovskiy wrote:
> 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: 54ebbfb1 ("tty: add TIOCGPTPEER ioctl")
I think its recommended these days to include at least 12 nibbles of
commit hash, i.e.
Fixes: 54ebbfb16034 ("tty: add TIOCGPTPEER ioctl")
(consider setting your git default to 12 with this):
git config core.abbrev 12
Cheers
James
> Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
> ---
> 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(-)
>
> diff --git a/arch/alpha/include/uapi/asm/ioctls.h b/arch/alpha/include/uapi/asm/ioctls.h
> index ff67b837..1cd7dc7 100644
> --- a/arch/alpha/include/uapi/asm/ioctls.h
> +++ b/arch/alpha/include/uapi/asm/ioctls.h
> @@ -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
> diff --git a/arch/mips/include/uapi/asm/ioctls.h b/arch/mips/include/uapi/asm/ioctls.h
> index 68e19b6..1609cb0 100644
> --- a/arch/mips/include/uapi/asm/ioctls.h
> +++ b/arch/mips/include/uapi/asm/ioctls.h
> @@ -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 */
> diff --git a/arch/parisc/include/uapi/asm/ioctls.h b/arch/parisc/include/uapi/asm/ioctls.h
> index 674c68a..d0e3321 100644
> --- a/arch/parisc/include/uapi/asm/ioctls.h
> +++ b/arch/parisc/include/uapi/asm/ioctls.h
> @@ -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
> diff --git a/arch/powerpc/include/uapi/asm/ioctls.h b/arch/powerpc/include/uapi/asm/ioctls.h
> index bfd609a..e3b1046 100644
> --- a/arch/powerpc/include/uapi/asm/ioctls.h
> +++ b/arch/powerpc/include/uapi/asm/ioctls.h
> @@ -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
> diff --git a/arch/sh/include/uapi/asm/ioctls.h b/arch/sh/include/uapi/asm/ioctls.h
> index eec7901..787bac9 100644
> --- a/arch/sh/include/uapi/asm/ioctls.h
> +++ b/arch/sh/include/uapi/asm/ioctls.h
> @@ -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 */
> diff --git a/arch/sparc/include/uapi/asm/ioctls.h b/arch/sparc/include/uapi/asm/ioctls.h
> index 6d27398..f5df72b 100644
> --- a/arch/sparc/include/uapi/asm/ioctls.h
> +++ b/arch/sparc/include/uapi/asm/ioctls.h
> @@ -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)
> diff --git a/arch/xtensa/include/uapi/asm/ioctls.h b/arch/xtensa/include/uapi/asm/ioctls.h
> index 98b004e..47d82c0 100644
> --- a/arch/xtensa/include/uapi/asm/ioctls.h
> +++ b/arch/xtensa/include/uapi/asm/ioctls.h
> @@ -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)
> diff --git a/include/uapi/asm-generic/ioctls.h b/include/uapi/asm-generic/ioctls.h
> index 06d5f7d..14baf9f2 100644
> --- a/include/uapi/asm-generic/ioctls.h
> +++ b/include/uapi/asm-generic/ioctls.h
> @@ -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
>
> --
> glebfm
>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] tty: Fix TIOCGPTPEER ioctl definition
@ 2017-07-11 10:03 ` James Hogan
0 siblings, 0 replies; 13+ messages in thread
From: James Hogan @ 2017-07-11 10:03 UTC (permalink / raw)
To: Gleb Fotengauer-Malinovskiy
Cc: Aleksa Sarai, Greg Kroah-Hartman, Jiri Slaby, Arnd Bergmann,
Christian Brauner, Valentin Rothberg, Dmitry V. Levin,
linux-kernel, linux-alpha, linux-mips, linux-parisc,
linuxppc-dev, linux-sh, sparclinux, linux-xtensa, linux-arch
[-- Attachment #1: Type: text/plain, Size: 6491 bytes --]
On Tue, Jul 11, 2017 at 03:12:17AM +0300, Gleb Fotengauer-Malinovskiy wrote:
> 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: 54ebbfb1 ("tty: add TIOCGPTPEER ioctl")
I think its recommended these days to include at least 12 nibbles of
commit hash, i.e.
Fixes: 54ebbfb16034 ("tty: add TIOCGPTPEER ioctl")
(consider setting your git default to 12 with this):
git config core.abbrev 12
Cheers
James
> Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
> ---
> 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(-)
>
> diff --git a/arch/alpha/include/uapi/asm/ioctls.h b/arch/alpha/include/uapi/asm/ioctls.h
> index ff67b837..1cd7dc7 100644
> --- a/arch/alpha/include/uapi/asm/ioctls.h
> +++ b/arch/alpha/include/uapi/asm/ioctls.h
> @@ -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
> diff --git a/arch/mips/include/uapi/asm/ioctls.h b/arch/mips/include/uapi/asm/ioctls.h
> index 68e19b6..1609cb0 100644
> --- a/arch/mips/include/uapi/asm/ioctls.h
> +++ b/arch/mips/include/uapi/asm/ioctls.h
> @@ -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 */
> diff --git a/arch/parisc/include/uapi/asm/ioctls.h b/arch/parisc/include/uapi/asm/ioctls.h
> index 674c68a..d0e3321 100644
> --- a/arch/parisc/include/uapi/asm/ioctls.h
> +++ b/arch/parisc/include/uapi/asm/ioctls.h
> @@ -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
> diff --git a/arch/powerpc/include/uapi/asm/ioctls.h b/arch/powerpc/include/uapi/asm/ioctls.h
> index bfd609a..e3b1046 100644
> --- a/arch/powerpc/include/uapi/asm/ioctls.h
> +++ b/arch/powerpc/include/uapi/asm/ioctls.h
> @@ -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
> diff --git a/arch/sh/include/uapi/asm/ioctls.h b/arch/sh/include/uapi/asm/ioctls.h
> index eec7901..787bac9 100644
> --- a/arch/sh/include/uapi/asm/ioctls.h
> +++ b/arch/sh/include/uapi/asm/ioctls.h
> @@ -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 */
> diff --git a/arch/sparc/include/uapi/asm/ioctls.h b/arch/sparc/include/uapi/asm/ioctls.h
> index 6d27398..f5df72b 100644
> --- a/arch/sparc/include/uapi/asm/ioctls.h
> +++ b/arch/sparc/include/uapi/asm/ioctls.h
> @@ -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)
> diff --git a/arch/xtensa/include/uapi/asm/ioctls.h b/arch/xtensa/include/uapi/asm/ioctls.h
> index 98b004e..47d82c0 100644
> --- a/arch/xtensa/include/uapi/asm/ioctls.h
> +++ b/arch/xtensa/include/uapi/asm/ioctls.h
> @@ -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)
> diff --git a/include/uapi/asm-generic/ioctls.h b/include/uapi/asm-generic/ioctls.h
> index 06d5f7d..14baf9f2 100644
> --- a/include/uapi/asm-generic/ioctls.h
> +++ b/include/uapi/asm-generic/ioctls.h
> @@ -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
>
> --
> glebfm
>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] tty: Fix TIOCGPTPEER ioctl definition
@ 2017-07-11 10:03 ` James Hogan
0 siblings, 0 replies; 13+ messages in thread
From: James Hogan @ 2017-07-11 10:03 UTC (permalink / raw)
To: Gleb Fotengauer-Malinovskiy
Cc: Aleksa Sarai, Greg Kroah-Hartman, Jiri Slaby, Arnd Bergmann,
Christian Brauner, Valentin Rothberg, Dmitry V. Levin,
linux-kernel, linux-alpha, linux-mips, linux-parisc,
linuxppc-dev, linux-sh, sparclinux, linux-xtensa, linux-arch
[-- Attachment #1: Type: text/plain, Size: 6491 bytes --]
On Tue, Jul 11, 2017 at 03:12:17AM +0300, Gleb Fotengauer-Malinovskiy wrote:
> 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: 54ebbfb1 ("tty: add TIOCGPTPEER ioctl")
I think its recommended these days to include at least 12 nibbles of
commit hash, i.e.
Fixes: 54ebbfb16034 ("tty: add TIOCGPTPEER ioctl")
(consider setting your git default to 12 with this):
git config core.abbrev 12
Cheers
James
> Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
> ---
> 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(-)
>
> diff --git a/arch/alpha/include/uapi/asm/ioctls.h b/arch/alpha/include/uapi/asm/ioctls.h
> index ff67b837..1cd7dc7 100644
> --- a/arch/alpha/include/uapi/asm/ioctls.h
> +++ b/arch/alpha/include/uapi/asm/ioctls.h
> @@ -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
> diff --git a/arch/mips/include/uapi/asm/ioctls.h b/arch/mips/include/uapi/asm/ioctls.h
> index 68e19b6..1609cb0 100644
> --- a/arch/mips/include/uapi/asm/ioctls.h
> +++ b/arch/mips/include/uapi/asm/ioctls.h
> @@ -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 */
> diff --git a/arch/parisc/include/uapi/asm/ioctls.h b/arch/parisc/include/uapi/asm/ioctls.h
> index 674c68a..d0e3321 100644
> --- a/arch/parisc/include/uapi/asm/ioctls.h
> +++ b/arch/parisc/include/uapi/asm/ioctls.h
> @@ -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
> diff --git a/arch/powerpc/include/uapi/asm/ioctls.h b/arch/powerpc/include/uapi/asm/ioctls.h
> index bfd609a..e3b1046 100644
> --- a/arch/powerpc/include/uapi/asm/ioctls.h
> +++ b/arch/powerpc/include/uapi/asm/ioctls.h
> @@ -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
> diff --git a/arch/sh/include/uapi/asm/ioctls.h b/arch/sh/include/uapi/asm/ioctls.h
> index eec7901..787bac9 100644
> --- a/arch/sh/include/uapi/asm/ioctls.h
> +++ b/arch/sh/include/uapi/asm/ioctls.h
> @@ -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 */
> diff --git a/arch/sparc/include/uapi/asm/ioctls.h b/arch/sparc/include/uapi/asm/ioctls.h
> index 6d27398..f5df72b 100644
> --- a/arch/sparc/include/uapi/asm/ioctls.h
> +++ b/arch/sparc/include/uapi/asm/ioctls.h
> @@ -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)
> diff --git a/arch/xtensa/include/uapi/asm/ioctls.h b/arch/xtensa/include/uapi/asm/ioctls.h
> index 98b004e..47d82c0 100644
> --- a/arch/xtensa/include/uapi/asm/ioctls.h
> +++ b/arch/xtensa/include/uapi/asm/ioctls.h
> @@ -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)
> diff --git a/include/uapi/asm-generic/ioctls.h b/include/uapi/asm-generic/ioctls.h
> index 06d5f7d..14baf9f2 100644
> --- a/include/uapi/asm-generic/ioctls.h
> +++ b/include/uapi/asm-generic/ioctls.h
> @@ -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
>
> --
> glebfm
>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: [PATCH] tty: Fix TIOCGPTPEER ioctl definition
2017-07-11 0:12 ` Gleb Fotengauer-Malinovskiy
@ 2017-07-11 14:23 ` David Laight
-1 siblings, 0 replies; 13+ messages in thread
From: David Laight @ 2017-07-11 14:23 UTC (permalink / raw)
To: 'Gleb Fotengauer-Malinovskiy', Aleksa Sarai, Greg Kroah-Hartman
Cc: linux-arch, linux-mips, Valentin Rothberg, linux-parisc,
Arnd Bergmann, linux-sh, linux-xtensa, linux-alpha, linux-kernel,
Dmitry V. Levin, Jiri Slaby, sparclinux, Christian Brauner,
linuxppc-dev
From: Linuxppc-dev Gleb Fotengauer-Malinovskiy
> Sent: 11 July 2017 01:12
> 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: 54ebbfb1 ("tty: add TIOCGPTPEER ioctl")
...
> -#define TIOCGPTPEER _IOR('T', 0x41, int) /* Safely open the slave */
> +#define TIOCGPTPEER _IO('T', 0x41) /* Safely open the slave */
This is a user API change. When was the ioctl added?
David
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: [PATCH] tty: Fix TIOCGPTPEER ioctl definition
@ 2017-07-11 14:23 ` David Laight
0 siblings, 0 replies; 13+ messages in thread
From: David Laight @ 2017-07-11 14:23 UTC (permalink / raw)
To: 'Gleb Fotengauer-Malinovskiy', Aleksa Sarai, Greg Kroah-Hartman
Cc: linux-arch, linux-mips, Valentin Rothberg, linux-parisc,
Arnd Bergmann, linux-sh, linux-xtensa, linux-alpha, linux-kernel,
Dmitry V. Levin, Jiri Slaby, sparclinux, Christian Brauner,
linuxppc-dev
From: Linuxppc-dev Gleb Fotengauer-Malinovskiy
> Sent: 11 July 2017 01:12
> 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.
>=20
> Fixes: 54ebbfb1 ("tty: add TIOCGPTPEER ioctl")
...
> -#define TIOCGPTPEER _IOR('T', 0x41, int) /* Safely open the slave */
> +#define TIOCGPTPEER _IO('T', 0x41) /* Safely open the slave */
This is a user API change. When was the ioctl added?
David
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] tty: Fix TIOCGPTPEER ioctl definition
2017-07-11 14:23 ` David Laight
@ 2017-07-11 14:45 ` Aleksa Sarai
-1 siblings, 0 replies; 13+ messages in thread
From: Aleksa Sarai @ 2017-07-11 14:45 UTC (permalink / raw)
To: David Laight, 'Gleb Fotengauer-Malinovskiy', Greg Kroah-Hartman
Cc: linux-arch, linux-mips, Valentin Rothberg, linux-parisc,
Arnd Bergmann, linux-sh, linux-xtensa, linux-alpha, linux-kernel,
Dmitry V. Levin, Jiri Slaby, sparclinux, Christian Brauner,
linuxppc-dev
>> Sent: 11 July 2017 01:12
>> 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: 54ebbfb1 ("tty: add TIOCGPTPEER ioctl")
> ...
>> -#define TIOCGPTPEER _IOR('T', 0x41, int) /* Safely open the slave */
>> +#define TIOCGPTPEER _IO('T', 0x41) /* Safely open the slave */
>
> This is a user API change. When was the ioctl added?
It was just pulled this merge window (4.13-rc1).
% git tag --contains 54ebbfb1603415d9953c150535850d30609ef077
%
--
Aleksa Sarai
Software Engineer (Containers)
SUSE Linux GmbH
https://www.cyphar.com/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] tty: Fix TIOCGPTPEER ioctl definition
@ 2017-07-11 14:45 ` Aleksa Sarai
0 siblings, 0 replies; 13+ messages in thread
From: Aleksa Sarai @ 2017-07-11 14:45 UTC (permalink / raw)
To: David Laight, 'Gleb Fotengauer-Malinovskiy', Greg Kroah-Hartman
Cc: linux-arch, linux-mips, Valentin Rothberg, linux-parisc,
Arnd Bergmann, linux-sh, linux-xtensa, linux-alpha, linux-kernel,
Dmitry V. Levin, Jiri Slaby, sparclinux, Christian Brauner,
linuxppc-dev
>> Sent: 11 July 2017 01:12
>> 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: 54ebbfb1 ("tty: add TIOCGPTPEER ioctl")
> ...
>> -#define TIOCGPTPEER _IOR('T', 0x41, int) /* Safely open the slave */
>> +#define TIOCGPTPEER _IO('T', 0x41) /* Safely open the slave */
>
> This is a user API change. When was the ioctl added?
It was just pulled this merge window (4.13-rc1).
% git tag --contains 54ebbfb1603415d9953c150535850d30609ef077
%
--
Aleksa Sarai
Software Engineer (Containers)
SUSE Linux GmbH
https://www.cyphar.com/
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2017-07-11 14:45 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-11 0:12 [PATCH] tty: Fix TIOCGPTPEER ioctl definition Gleb Fotengauer-Malinovskiy
2017-07-11 0:12 ` Gleb Fotengauer-Malinovskiy
2017-07-11 2:07 ` Aleksa Sarai
2017-07-11 2:07 ` Aleksa Sarai
2017-07-11 7:30 ` Arnd Bergmann
2017-07-11 7:30 ` Arnd Bergmann
2017-07-11 10:03 ` James Hogan
2017-07-11 10:03 ` James Hogan
2017-07-11 10:03 ` James Hogan
2017-07-11 14:23 ` David Laight
2017-07-11 14:23 ` David Laight
2017-07-11 14:45 ` Aleksa Sarai
2017-07-11 14:45 ` Aleksa Sarai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.