Changeset fd4d8c0 in mainline for generic/src/mm/as.c


Ignore:
Timestamp:
2006-05-25T21:21:58Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b31d188
Parents:
baafe71
Message:

Modify as_area_share() to accept destination area flags bitmask from the sender
(i.e. the sender can limit access mode to the shared area for the recipient).
Modify IPC_M_AS_AREA_SEND code to support this. Arguments for sender: arg1=as_area,
arg2=size, arg3=flags_mask.

The mechanism seems to work, but the page fault handlers need to be altered to
distinguish between faults under different access modes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/mm/as.c

    rbaafe71 rfd4d8c0  
    459459 * sh_info of the source area.
    460460 *
    461  * @param src_as Pointer to source address space
     461 * @param src_as Pointer to source address space.
    462462 * @param src_base Base address of the source address space area.
    463  * @param acc_size Expected size of the source area
    464  * @param dst_base Target base address
     463 * @param acc_size Expected size of the source area.
     464 * @param dst_base Target base address.
     465 * @param dst_flags_mask Destination address space area flags mask.
    465466 *
    466467 * @return Zero on success or ENOENT if there is no such task or
     
    472473 */
    473474int as_area_share(as_t *src_as, __address src_base, size_t acc_size,
    474                   __address dst_base)
     475                  __address dst_base, int dst_flags_mask)
    475476{
    476477        ipl_t ipl;
     
    568569         * attribute set which prevents race condition with
    569570         * preliminary as_page_fault() calls.
    570          */
    571         dst_area = as_area_create(AS, src_flags, src_size, dst_base, AS_AREA_ATTR_PARTIAL, &anon_backend, NULL);
     571         * The flags of the source area are masked against dst_flags_mask
     572         * to support sharing in less privileged mode.
     573         */
     574        dst_area = as_area_create(AS, src_flags & dst_flags_mask, src_size, dst_base,
     575                                  AS_AREA_ATTR_PARTIAL, &anon_backend, NULL);
    572576        if (!dst_area) {
    573577                /*
Note: See TracChangeset for help on using the changeset viewer.