bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #29914] *_reply.defs can't handle error replies due to type checks


From: Carl Fredrik Hammar
Subject: [bug #29914] *_reply.defs can't handle error replies due to type checks
Date: Wed, 19 May 2010 12:05:15 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100501 Iceweasel/3.5.9 (like Firefox/3.5.9)

URL:
  <http://savannah.gnu.org/bugs/?29914>

                 Summary: *_reply.defs can't handle error replies due to type
checks
                 Project: The GNU Hurd
            Submitted by: hammy
            Submitted on: Wed 19 May 2010 02:05:14 PM CEST
                Category: GNU MIG
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Reproducibility: None
              Size (loc): None
         Planned Release: None
                  Effort: 0.00
Wiki-like text discussion box: 

    _______________________________________________________

Details:

The specific interfaces for the reply side of a protocol can't handle
error replies if the routine has out parameters because then the replies
are too small since the error messages only contain a return value.

This is easy to see by examining the generated skeletons.  Run `make term'
and look at term/device_replyServer.c:_Xdevice_open_reply.  It returns
directly if msgh_size isn't the size of a successful message.

The term translator works around this problem by turning off type checking
by passing -DTypeCheck=0 when compiling term/device_replyServer.c.
However, this is only acceptable if the server sending the replies can
be trusted, which should be the case here since the server is Mach,
or interposed itself between the client and Mach in a privileged fashion.

The root of the problem is that the *_reply.defs interfaces aren't
distinguished by mig from regular interfaces, and the current behavior
is the expected behavior for simple routines.  We could use the
currently ignored retcode tag to distinguish them, which was added for
compatibility with OSF Mig.  Though, we should check that this won't
break the compatibility first.

A more involved but ideal fix would be to add a new flag to mig for
generating the reply side of an interface.  This would also free us from
maintaining the reply versions of interfaces.





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?29914>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]