HomeAbout Us A-Z IndexSearch * Contact Us Register LoginPress Shop

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 0311 Details

Help Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges

This page provides all information on Problem Report 0311.


Report 0311 Actions


    Problem Report Number 0311
    Submitter's Classification Specification problem
    State Resolved
    Resolution Permanent Interpretation (PIN)
    Problem Resolution ID PIN.X.0027
    Raised 1994-05-02 08:00
    Updated 2003-03-13 08:00
    Published 1994-05-04 08:00
    Product Standard Internationalised System Calls and Libraries (XPG4)
    Certification Program The Open Brand certification program
    Test Suite VSX4 version 4.3.2
    Test Identification XPG4.os/ipc/shmat 2
    Specification System Interfaces and Headers Issue 4
    Location in Spec See Problem Text
    Problem Summary PIN4.027 The test in question does the following: a) shmat() to generate a starting location. b) Using value returned from (a), add the size of shared memory segment from (a) to compute new address for seconda...
    Problem Text

    The test in question does the following:

    a) shmat() to generate a starting location.

    b) Using value returned from (a), add the size of shared memory
    segment from (a) to compute new address for secondary call.

    c) Using address from (b), call shmat() specifying address from
    (b) as the attach point.

    What this effectively tests a systems ability to alias; that is, have
    several virtual addresses point to the same physical page.

    As far as we know, no standards have ever specifically stated aliasing is
    a requirement. Furthermore, other calls such as mmap() with the MAP_FIXED
    option specifically state address specifications are not a good idea as
    architectures can vary. This is stated in POSIX 1003.4 and the AES.

    For HP-PA, aliasing is difficult as the hardware is based on a virtually
    indexed cache. This means we use the virtual address to select the cache
    line where the data resides. To make "full aliasing" work, HP-UX must
    guarantee that every virtual address select the same cache line. Not an
    easy task. In fact, the alternatives would be performance inhibitive as
    the result would lead to severe cache flushing upon every write access that
    uses an address different from the previous access.

    Because our shared memory segments reside in the "global address" space,
    the address must be the same for all users. shmget() creates the object
    and at that time the address space is selected to guarantee availability.
    Once the address is selected, all other processes will(must) see the same
    attach point if they shmat the object.

    In HP's opinion HP-UX meets the standard by returning EINVAL since any
    address generated is "illegal", other than the one created by the shmget().
    To state otherwise requires "aliasing".


    Test Output
    /tset/XPG4.os/ipc/shmat/T.shmat 2 Failed

    Test Information:
    shmat(shmid2, 0x800fe800, SHM_RND) failed, returned 0xffffffff with
    errno 22 (EINVAL)

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    From the above commentary, it seems that, while the XPG4 specification
    defines the behaviour that is required when a specific address is given,
    there is no requirement that any address should be considered valid for
    the attachment of a shared memory segment. Thus the use of a specific
    memory address, even if this is calculated from a known address at which
    a shared memory segment is attached, should be considered unportable.
    I would recommend that a permanent interpretation be granted on the
    basis that any address given to the shmat() call could be considered invalid.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution Permanent Interpretation (PIN)
    Review Conclusion
    A permanent interpretation is granted.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority