public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug hurd/766] ioctl() incorrectly decodes argument
       [not found] <bug-766-131@http.sourceware.org/bugzilla/>
@ 2012-05-11  2:54 ` tschwinge at sourceware dot org
  2012-05-11 17:01 ` roland at gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 12+ messages in thread
From: tschwinge at sourceware dot org @ 2012-05-11  2:54 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=766

Thomas Schwinge <tschwinge at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tschwinge at sourceware dot
                   |                            |org

--- Comment #8 from Thomas Schwinge <tschwinge at sourceware dot org> 2012-05-11 02:54:06 UTC ---
6753048948b86f3b045710f77e1616b348562fa9

Is the test case worth being added, too?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug hurd/766] ioctl() incorrectly decodes argument
       [not found] <bug-766-131@http.sourceware.org/bugzilla/>
  2012-05-11  2:54 ` [Bug hurd/766] ioctl() incorrectly decodes argument tschwinge at sourceware dot org
@ 2012-05-11 17:01 ` roland at gnu dot org
  2014-02-16 18:28 ` jackie.rosen at hushmail dot com
  2014-05-28 19:44 ` schwab at sourceware dot org
  3 siblings, 0 replies; 12+ messages in thread
From: roland at gnu dot org @ 2012-05-11 17:01 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=766

--- Comment #9 from Roland McGrath <roland at gnu dot org> 2012-05-11 17:00:26 UTC ---
Having regression cases in the libc test suite is always a good idea.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug hurd/766] ioctl() incorrectly decodes argument
       [not found] <bug-766-131@http.sourceware.org/bugzilla/>
  2012-05-11  2:54 ` [Bug hurd/766] ioctl() incorrectly decodes argument tschwinge at sourceware dot org
  2012-05-11 17:01 ` roland at gnu dot org
@ 2014-02-16 18:28 ` jackie.rosen at hushmail dot com
  2014-05-28 19:44 ` schwab at sourceware dot org
  3 siblings, 0 replies; 12+ messages in thread
From: jackie.rosen at hushmail dot com @ 2014-02-16 18:28 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=766

Jackie Rosen <jackie.rosen at hushmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jackie.rosen at hushmail dot com

--- Comment #10 from Jackie Rosen <jackie.rosen at hushmail dot com> ---
*** Bug 260998 has been marked as a duplicate of this bug. ***
Seen from the domain http://volichat.com
Page where seen: http://volichat.com/adult-chat-rooms
Marked for reference. Resolved as fixed @bugzilla.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug hurd/766] ioctl() incorrectly decodes argument
       [not found] <bug-766-131@http.sourceware.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2014-02-16 18:28 ` jackie.rosen at hushmail dot com
@ 2014-05-28 19:44 ` schwab at sourceware dot org
  3 siblings, 0 replies; 12+ messages in thread
From: schwab at sourceware dot org @ 2014-05-28 19:44 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=766

Andreas Schwab <schwab at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|jackie.rosen at hushmail dot com   |

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug hurd/766] ioctl() incorrectly decodes argument
  2005-02-25 18:32 [Bug hurd/766] New: " samuel dot thibault at ens-lyon dot org
                   ` (6 preceding siblings ...)
  2006-02-05 22:43 ` roland at gnu dot org
@ 2006-11-22 13:39 ` tschwinge at gnu dot org
  7 siblings, 0 replies; 12+ messages in thread
From: tschwinge at gnu dot org @ 2006-11-22 13:39 UTC (permalink / raw)
  To: glibc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bug-hurd at gnu dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=766

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug hurd/766] ioctl() incorrectly decodes argument
  2005-02-25 18:32 [Bug hurd/766] New: " samuel dot thibault at ens-lyon dot org
                   ` (5 preceding siblings ...)
  2005-11-23 16:47 ` samuel dot thibault at ens-lyon dot org
@ 2006-02-05 22:43 ` roland at gnu dot org
  2006-11-22 13:39 ` tschwinge at gnu dot org
  7 siblings, 0 replies; 12+ messages in thread
From: roland at gnu dot org @ 2006-02-05 22:43 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From roland at gnu dot org  2006-02-05 22:43 -------
updated version, still outstanding post-2.3.6

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|2.3.2                       |2.3.6


http://sourceware.org/bugzilla/show_bug.cgi?id=766

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug hurd/766] ioctl() incorrectly decodes argument
  2005-02-25 18:32 [Bug hurd/766] New: " samuel dot thibault at ens-lyon dot org
                   ` (4 preceding siblings ...)
  2005-08-11  1:20 ` samuel dot thibault at ens-lyon dot org
@ 2005-11-23 16:47 ` samuel dot thibault at ens-lyon dot org
  2006-02-05 22:43 ` roland at gnu dot org
  2006-11-22 13:39 ` tschwinge at gnu dot org
  7 siblings, 0 replies; 12+ messages in thread
From: samuel dot thibault at ens-lyon dot org @ 2005-11-23 16:47 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From samuel dot thibault at ens-lyon dot org  2005-11-23 16:47 -------
Any progress on this issue? 

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=766

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug hurd/766] ioctl() incorrectly decodes argument
  2005-02-25 18:32 [Bug hurd/766] New: " samuel dot thibault at ens-lyon dot org
                   ` (3 preceding siblings ...)
  2005-07-27 23:33 ` samuel dot thibault at ens-lyon dot org
@ 2005-08-11  1:20 ` samuel dot thibault at ens-lyon dot org
  2005-11-23 16:47 ` samuel dot thibault at ens-lyon dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: samuel dot thibault at ens-lyon dot org @ 2005-08-11  1:20 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From samuel dot thibault at ens-lyon dot org  2005-08-11 01:20 -------
(From update of attachment 561)
2005-07-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* ioctl.c (__ioctl): Add handling of parameter-less ioctls.

2005-07-28  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* ioctls.h (_IOIW): New macro for immediate-write ioctls.


-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=766

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug hurd/766] ioctl() incorrectly decodes argument
  2005-02-25 18:32 [Bug hurd/766] New: " samuel dot thibault at ens-lyon dot org
                   ` (2 preceding siblings ...)
  2005-07-27 23:18 ` samuel dot thibault at ens-lyon dot org
@ 2005-07-27 23:33 ` samuel dot thibault at ens-lyon dot org
  2005-08-11  1:20 ` samuel dot thibault at ens-lyon dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: samuel dot thibault at ens-lyon dot org @ 2005-07-27 23:33 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From samuel dot thibault at ens-lyon dot org  2005-07-27 23:33 -------
Hi,

I attached a patch to correct the bug: it corrects the meaning of IOC_VOID /
IOC_IN / IOC_OUT:
- IOC_OUT / IOC_IN means that data is passed via a pointer (input/output/both ways);
- IOC_VOID means that either there is no data (_IOT_COUNT0 (type) == 0),
or the only data is an integer passed as an immediate value (_IOT_COUNT0
(type) == 1).

When (_IOT_COUNT0(type) == 0), that means there is no data, so
va_start/va_arg/va_end are now not even called, avoiding any random value
or even crash.

I looked through the list of hurd's ioctls, there is none that uses an
immediate argument, but since there is code to handle that case when building
the RPC, I guess it was yet considered to be possible. And indeed some other
systems sometimes define ioctl with immediate arguments: TCSBRK, TCXONC,
TCFLSH, TIOSCTTY, HDIO_SET_DMA & such, LPCHAR, ... So that I added an _IOIW()
macro to let people define such ioctl calls (IO Immediate Write).

Please ignore the "TIOCSETD segfaults" testcase in previous bug report:
of course the integer should be passed via a pointer in this case.

The two attached testcases work correctly with the patch applied.

Regards,
Samuel


-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=766

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug hurd/766] ioctl() incorrectly decodes argument
  2005-02-25 18:32 [Bug hurd/766] New: " samuel dot thibault at ens-lyon dot org
  2005-07-27 23:15 ` [Bug hurd/766] " samuel dot thibault at ens-lyon dot org
  2005-07-27 23:17 ` samuel dot thibault at ens-lyon dot org
@ 2005-07-27 23:18 ` samuel dot thibault at ens-lyon dot org
  2005-07-27 23:33 ` samuel dot thibault at ens-lyon dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: samuel dot thibault at ens-lyon dot org @ 2005-07-27 23:18 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From samuel dot thibault at ens-lyon dot org  2005-07-27 23:18 -------
Created an attachment (id=563)
 --> (http://sources.redhat.com/bugzilla/attachment.cgi?id=563&action=view)
Testcase (still works)

This testcase checks that ioctls continue to work, event "1 integer passed via
pointer" ones.


-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=766

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug hurd/766] ioctl() incorrectly decodes argument
  2005-02-25 18:32 [Bug hurd/766] New: " samuel dot thibault at ens-lyon dot org
  2005-07-27 23:15 ` [Bug hurd/766] " samuel dot thibault at ens-lyon dot org
@ 2005-07-27 23:17 ` samuel dot thibault at ens-lyon dot org
  2005-07-27 23:18 ` samuel dot thibault at ens-lyon dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: samuel dot thibault at ens-lyon dot org @ 2005-07-27 23:17 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From samuel dot thibault at ens-lyon dot org  2005-07-27 23:17 -------
Created an attachment (id=562)
 --> (http://sources.redhat.com/bugzilla/attachment.cgi?id=562&action=view)
testcase (was failing)

This testcase was failing with this error message:
ioctl: (ipc/mig) server type check failure
With previously attached patch, it now works.


-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=766

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug hurd/766] ioctl() incorrectly decodes argument
  2005-02-25 18:32 [Bug hurd/766] New: " samuel dot thibault at ens-lyon dot org
@ 2005-07-27 23:15 ` samuel dot thibault at ens-lyon dot org
  2005-07-27 23:17 ` samuel dot thibault at ens-lyon dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: samuel dot thibault at ens-lyon dot org @ 2005-07-27 23:15 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From samuel dot thibault at ens-lyon dot org  2005-07-27 23:15 -------
Created an attachment (id=561)
 --> (http://sources.redhat.com/bugzilla/attachment.cgi?id=561&action=view)
Proposed patch

This patch corrects the no-parameter case, and add an _IOIW() ioctl declaration
macro for ioctls that would get value as immediates rather that by pointer (IO
Immediate Write).


-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=766

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-05-28 19:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-766-131@http.sourceware.org/bugzilla/>
2012-05-11  2:54 ` [Bug hurd/766] ioctl() incorrectly decodes argument tschwinge at sourceware dot org
2012-05-11 17:01 ` roland at gnu dot org
2014-02-16 18:28 ` jackie.rosen at hushmail dot com
2014-05-28 19:44 ` schwab at sourceware dot org
2005-02-25 18:32 [Bug hurd/766] New: " samuel dot thibault at ens-lyon dot org
2005-07-27 23:15 ` [Bug hurd/766] " samuel dot thibault at ens-lyon dot org
2005-07-27 23:17 ` samuel dot thibault at ens-lyon dot org
2005-07-27 23:18 ` samuel dot thibault at ens-lyon dot org
2005-07-27 23:33 ` samuel dot thibault at ens-lyon dot org
2005-08-11  1:20 ` samuel dot thibault at ens-lyon dot org
2005-11-23 16:47 ` samuel dot thibault at ens-lyon dot org
2006-02-05 22:43 ` roland at gnu dot org
2006-11-22 13:39 ` tschwinge at gnu dot org

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 read-only IMAP folder(s) and NNTP newsgroup(s).