From: James Hogan <james.hogan@imgtec.com>
To: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
Cc: Aleksa Sarai <asarai@suse.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.com>, Arnd Bergmann <arnd@arndb.de>,
Christian Brauner <christian.brauner@ubuntu.com>,
Valentin Rothberg <vrothberg@suse.com>,
"Dmitry V. Levin" <ldv@altlinux.org>,
<linux-kernel@vger.kernel.org>, <linux-alpha@vger.kernel.org>,
<linux-mips@linux-mips.org>, <linux-parisc@vger.kernel.org>,
<linuxppc-dev@lists.ozlabs.org>, <linux-sh@vger.kernel.org>,
<sparclinux@vger.kernel.org>, <linux-xtensa@linux-xtensa.org>,
<linux-arch@vger.kernel.org>
Subject: Re: [PATCH] tty: Fix TIOCGPTPEER ioctl definition
Date: Tue, 11 Jul 2017 11:03:43 +0100 [thread overview]
Message-ID: <20170711100343.GP31455@jhogan-linux.le.imgtec.org> (raw)
In-Reply-To: <20170711001207.GA11642@glebfm.cloud.tilaa.com>
[-- 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 --]
next prev parent reply other threads:[~2017-07-11 10:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-11 0:12 [PATCH] tty: Fix TIOCGPTPEER ioctl definition Gleb Fotengauer-Malinovskiy
2017-07-11 2:07 ` Aleksa Sarai
2017-07-11 7:30 ` Arnd Bergmann
2017-07-11 10:03 ` James Hogan [this message]
2017-07-11 14:23 ` David Laight
2017-07-11 14:45 ` Aleksa Sarai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170711100343.GP31455@jhogan-linux.le.imgtec.org \
--to=james.hogan@imgtec.com \
--cc=arnd@arndb.de \
--cc=asarai@suse.de \
--cc=christian.brauner@ubuntu.com \
--cc=glebfm@altlinux.org \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=ldv@altlinux.org \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux-xtensa@linux-xtensa.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=sparclinux@vger.kernel.org \
--cc=vrothberg@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).