bugThe GNU Hurd - Bugs: bug #29914, *_reply.defs can't handle error...

 
 

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

Submitter:  Carl Fredrik Hammar <hammy>
Submitted:  Wed 19 May 2010 12:05:14 PM UTC
   
 
Category:  GNU MIG Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Open Reproducibility:  None
Size (loc):  None Planned Release:  None
Effort:  0.00
Wiki-like text discussion box: 


* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 19 May 2010 12:05:14 PM UTC, original submission:  

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.

Carl Fredrik Hammar <hammy>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hammy (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-54b4.
    Corresponding source code