From: Stephen Hemminger <shemminger@osdl.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [Bug 7635] New: ioctl(fd,TCSBRK,1) on socket yields EFAULT, expected EINVAL/ENOTTY
Date: Fri, 8 Dec 2006 14:00:21 -0800 [thread overview]
Message-ID: <20061208140021.27e9ab2d@freekitty> (raw)
In-Reply-To: <20061208.133633.77400985.davem@davemloft.net>
On Fri, 08 Dec 2006 13:36:33 -0800 (PST)
David Miller <davem@davemloft.net> wrote:
> From: Stephen Hemminger <shemminger@osdl.org>
> Date: Fri, 8 Dec 2006 09:50:55 -0800
>
> > ioctl(TCSBRK,1) errno
> > pty 0
> > pipe 22/EINVAL
> > /dev/null 25/ENOTTY
> > reg_file 25/ENOTTY
> > socket 14/EFAULT
>
> If you call a TTY ioctl on a socket, it might not work, don't
> you think?
>
> ioctl values are numbered in the namespace of the object they are
> called upon, so an ioctl of value X can mean something different for a
> TTY than it does for socket.
That is not true on BSD or other unix standardish ioctl's.
There are no conflicts between the TIOC... values and the SIOC... values
> You're passing a garbage pointer to whatever socket ioctl happens
> to be aliased to the same value as TCSBRK on your platform.
It's not the garbage pointer.
Seems like one of those annoying standards compliance test
return value bugs that shouldn't really hit an application.
--
Stephen Hemminger <shemminger@osdl.org>
next prev parent reply other threads:[~2006-12-08 22:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-08 17:50 Fw: [Bug 7635] New: ioctl(fd,TCSBRK,1) on socket yields EFAULT, expected EINVAL/ENOTTY Stephen Hemminger
2006-12-08 21:36 ` David Miller
2006-12-08 22:00 ` Stephen Hemminger [this message]
2006-12-09 0:33 ` David Miller
2006-12-09 8:06 ` Eric Dumazet
2006-12-09 9:05 ` David Miller
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=20061208140021.27e9ab2d@freekitty \
--to=shemminger@osdl.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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).