]> Zhao Yanbai Git Server - minix.git/commitdiff
drop segment from safecopy invocations
authorBen Gras <ben@minix3.org>
Sat, 16 Jun 2012 01:46:15 +0000 (03:46 +0200)
committerBen Gras <ben@minix3.org>
Sat, 16 Jun 2012 16:22:51 +0000 (16:22 +0000)
. all invocations were S or D, so can safely be dropped
  to prepare for the segmentless world
. still assign D to the SCP_SEG field in the message
  to make previous kernels usable

87 files changed:
drivers/ahci/ahci.c
drivers/at_wini/at_wini.c
drivers/atl2/atl2.c
drivers/dec21140A/dec21140A.c
drivers/dp8390/dp8390.c
drivers/dpeth/dp.c
drivers/dpeth/netbuff.c
drivers/e1000/e1000.c
drivers/fbd/rule.c
drivers/filter/main.c
drivers/floppy/floppy.c
drivers/fxp/fxp.c
drivers/hello/hello.c
drivers/lance/lance.c
drivers/log/log.c
drivers/memory/memory.c
drivers/orinoco/orinoco.c
drivers/pci/main.c
drivers/pci/pci.c
drivers/printer/printer.c
drivers/random/main.c
drivers/rtl8139/rtl8139.c
drivers/rtl8169/rtl8169.c
drivers/tty/console.c
drivers/tty/keyboard.c
drivers/tty/pty.c
drivers/tty/rs232.c
drivers/tty/tty.c
drivers/vbox/hgcm.c
include/minix/com.h
include/minix/syslib.h
kernel/system/do_safecopy.c
lib/libaudiodriver/audio_fw.c
lib/libblockdriver/driver.c
lib/libblockdriver/trace.c
lib/libchardriver/chardriver.c
lib/libddekit/src/usb_server.c
lib/libminixfs/fetch_credentials.c
lib/libpuffs/link.c
lib/libpuffs/open.c
lib/libpuffs/path.c
lib/libpuffs/read.c
lib/libpuffs/stadir.c
lib/libsffs/lookup.c
lib/libsffs/misc.c
lib/libsffs/read.c
lib/libsffs/stat.c
lib/libsffs/util.c
lib/libsffs/write.c
lib/libsys/gcov.c
lib/libsys/sys_safecopy.c
lib/libvtreefs/link.c
lib/libvtreefs/path.c
lib/libvtreefs/read.c
lib/libvtreefs/stadir.c
servers/devman/device.c
servers/ds/store.c
servers/ext2/link.c
servers/ext2/misc.c
servers/ext2/mount.c
servers/ext2/open.c
servers/ext2/path.c
servers/ext2/read.c
servers/ext2/stadir.c
servers/inet/sr.c
servers/iso9660fs/misc.c
servers/iso9660fs/mount.c
servers/iso9660fs/path.c
servers/iso9660fs/read.c
servers/iso9660fs/stadir.c
servers/mfs/link.c
servers/mfs/misc.c
servers/mfs/mount.c
servers/mfs/open.c
servers/mfs/path.c
servers/mfs/read.c
servers/mfs/stadir.c
servers/pfs/read.c
servers/pfs/stadir.c
servers/pfs/uds.c
servers/vfs/main.c
servers/vfs/path.c
servers/vm/main.c
test/kernel/sys_vumap/vumaprelay.c
test/safecopy/requestor.c
test/safemap/requestor.c
test/safeperf/requestor.c

index 06d2e52cc49adcd28991018fbefb888264f6f8ec..b5ef43010d527a9aa240b75ae7f64c5dbecc25fc 100644 (file)
@@ -2563,7 +2563,7 @@ static int ahci_ioctl(dev_t minor, unsigned int request, endpoint_t endpt,
 
        case DIOCOPENCT:
                return sys_safecopyto(endpt, grant, 0,
-                       (vir_bytes) &ps->open_count, sizeof(ps->open_count), D);
+                       (vir_bytes) &ps->open_count, sizeof(ps->open_count));
 
        case DIOCFLUSH:
                if (ps->state != STATE_GOOD_DEV || (ps->flags & FLAG_BARRIER))
@@ -2576,7 +2576,7 @@ static int ahci_ioctl(dev_t minor, unsigned int request, endpoint_t endpt,
                        return EIO;
 
                if ((r = sys_safecopyfrom(endpt, grant, 0, (vir_bytes) &val,
-                       sizeof(val), D)) != OK)
+                       sizeof(val))) != OK)
                        return r;
 
                return gen_set_wcache(ps, val);
@@ -2589,7 +2589,7 @@ static int ahci_ioctl(dev_t minor, unsigned int request, endpoint_t endpt,
                        return r;
 
                return sys_safecopyto(endpt, grant, 0, (vir_bytes) &val,
-                       sizeof(val), D);
+                       sizeof(val));
        }
 
        return EINVAL;
index ff9917ffb32c59d325efb3402f6b03dd9d6acddb..312d6a6f8df12a637f564f7108455d9cfb62e45a 100644 (file)
@@ -2213,7 +2213,7 @@ static int w_ioctl(dev_t minor, unsigned int request, endpoint_t endpt,
        switch (request) {
        case DIOCTIMEOUT:
                r= sys_safecopyfrom(endpt, grant, 0, (vir_bytes)&timeout,
-                       sizeof(timeout), D);
+                       sizeof(timeout));
 
                if(r != OK)
                    return r;
@@ -2244,7 +2244,7 @@ static int w_ioctl(dev_t minor, unsigned int request, endpoint_t endpt,
                        }
        
                        r= sys_safecopyto(endpt, grant, 0, (vir_bytes)&prev,
-                               sizeof(prev), D);
+                               sizeof(prev));
 
                        if(r != OK)
                                return r;
@@ -2256,7 +2256,7 @@ static int w_ioctl(dev_t minor, unsigned int request, endpoint_t endpt,
                if (w_prepare(minor) == NULL) return ENXIO;
                count = w_wn->open_ct;
                r= sys_safecopyto(endpt, grant, 0, (vir_bytes)&count,
-                       sizeof(count), D);
+                       sizeof(count));
 
                if(r != OK)
                        return r;
index c06da5c9b5c3bbbf98a4b3da4f81e8a89814eb62..157121bdcdce1f3a6310bd15126e02dc1ca4e49f 100644 (file)
@@ -777,7 +777,7 @@ static void atl2_readv(const message *m, int from_int)
                batch = MIN(m->DL_COUNT - i, NR_IOREQS);
 
                r = sys_safecopyfrom(m->m_source, m->DL_GRANT, off, 
-                       (vir_bytes) iovec, batch * sizeof(iovec[0]), D);
+                       (vir_bytes) iovec, batch * sizeof(iovec[0]));
                if (r != OK)
                        panic("vector copy failed: %d", r);
 
@@ -786,7 +786,7 @@ static void atl2_readv(const message *m, int from_int)
                        size = MIN(iovp->iov_size, left);
 
                        r = sys_safecopyto(m->m_source, iovp->iov_grant, 0,
-                               (vir_bytes) pos, size, D);
+                               (vir_bytes) pos, size);
                        if (r != OK)
                                panic("safe copy failed: %d", r);
 
@@ -874,7 +874,7 @@ static void atl2_writev(const message *m, int from_int)
                batch = MIN(m->DL_COUNT - i, NR_IOREQS);
 
                r = sys_safecopyfrom(m->m_source, m->DL_GRANT, off, 
-                       (vir_bytes) iovec, batch * sizeof(iovec[0]), D);
+                       (vir_bytes) iovec, batch * sizeof(iovec[0]));
                if (r != OK)
                        panic("vector copy failed: %d", r);
 
@@ -890,7 +890,7 @@ static void atl2_writev(const message *m, int from_int)
                                r = sys_safecopyfrom(m->m_source,
                                        iovp->iov_grant, 0,
                                        (vir_bytes) (state.txd_base + pos),
-                                       skip, D);
+                                       skip);
                                if (r != OK)
                                        panic("safe copy failed: %d", r);
                                pos = 0;
@@ -898,7 +898,7 @@ static void atl2_writev(const message *m, int from_int)
 
                        r = sys_safecopyfrom(m->m_source, iovp->iov_grant,
                                skip, (vir_bytes) (state.txd_base + pos),
-                               size - skip, D);
+                               size - skip);
                        if (r != OK)
                                panic("safe copy failed: %d", r);
 
@@ -1051,7 +1051,7 @@ static void atl2_getstat(message *m)
        int r;
 
        sys_safecopyto(m->m_source, m->DL_GRANT, 0,
-               (vir_bytes) &state.stat, sizeof(state.stat), D);
+               (vir_bytes) &state.stat, sizeof(state.stat));
 
        m->m_type = DL_STAT_REPLY;
 
index 665752fd315824414f65f0a921dba7cd53d4997e..608b1742cae457b078c1083c1abace5cec2f4e8c 100644 (file)
@@ -178,7 +178,7 @@ static void do_get_stat_s(message * mp)
 
   if ((rc = sys_safecopyto(mp->m_source, mp->DL_GRANT, 0UL,
                        (vir_bytes)&dep->de_stat,
-                       sizeof(dep->de_stat), 0)) != OK)
+                       sizeof(dep->de_stat))) != OK)
         panic(str_CopyErrMsg, rc);
 
   mp->m_type = DL_STAT_REPLY;
@@ -511,7 +511,7 @@ static void do_vread_s(const message * mp, int from_int)
        bytes = size;
 
       r= sys_safecopyto(iovp->iod_proc_nr, iovp->iod_iovec[ix].iov_grant, 0,
-                       (vir_bytes)buffer, bytes, D);
+                       (vir_bytes)buffer, bytes);
       if (r != OK)
        panic(str_CopyErrMsg, r);
       buffer += bytes;
@@ -776,7 +776,7 @@ static void de_get_userdata_s(int user_proc, cp_grant_id_t grant,
   vir_bytes len;
 
   len = (count > IOVEC_NR ? IOVEC_NR : count) * sizeof(iovec_t);
-  rc = sys_safecopyfrom(user_proc, grant, 0, (vir_bytes)loc_addr, len, D);
+  rc = sys_safecopyfrom(user_proc, grant, 0, (vir_bytes)loc_addr, len);
   if (rc != OK)
     panic(str_CopyErrMsg, rc);
   return;
@@ -840,7 +840,7 @@ static void do_vwrite_s(const message * mp, int from_int){
        bytes = size;           
 
       r= sys_safecopyfrom(iovp->iod_proc_nr, iovp->iod_iovec[ix].iov_grant,
-                         0, (vir_bytes)buffer, bytes, D);
+                         0, (vir_bytes)buffer, bytes);
       if (r != OK)
        panic(str_CopyErrMsg, r);
       buffer += bytes;
index 80c971bce4bd9cd076b779e4ab635d845233e513..6b9c4d8aaf30137c6a0f1d0096c8bd72de0df82d 100644 (file)
@@ -1195,7 +1195,7 @@ vir_bytes count;
 
                r= sys_safecopyfrom(iovp->iod_proc_nr,
                        iovp->iod_iovec[i].iov_grant, offset,
-                       vir_hw, bytes, D);
+                       vir_hw, bytes);
                if (r != OK) {
                        panic("dp_user2nic_s: sys_safecopyfrom failed: %d", r);
                }
@@ -1320,7 +1320,7 @@ vir_bytes count;
                if (odd_byte)
                {
                        r= sys_safecopyfrom(user_proc, gid, offset, 
-                               (vir_bytes)&two_bytes[1], 1, D);
+                               (vir_bytes)&two_bytes[1], 1);
                        if (r != OK) { 
                                panic("dp_pio16_user2nic: sys_safecopyfrom failed: %d", r);
                        }
@@ -1348,7 +1348,7 @@ vir_bytes count;
                {
                        assert(bytes == 1);
                        r= sys_safecopyfrom(user_proc, gid, offset,
-                               (vir_bytes)&two_bytes[0], 1, D);
+                               (vir_bytes)&two_bytes[0], 1);
                        if (r != OK) {
                                panic("dp_pio16_user2nic: sys_safecopyfrom failed: %d", r);
                        }
@@ -1411,7 +1411,7 @@ vir_bytes count;
 
                r= sys_safecopyto(iovp->iod_proc_nr,
                        iovp->iod_iovec[i].iov_grant, offset,
-                       vir_hw, bytes, D);
+                       vir_hw, bytes);
                if (r != OK)
                        panic("dp_nic2user_s: sys_safecopyto failed: %d", r);
 
@@ -1521,7 +1521,7 @@ vir_bytes count;
                if (odd_byte)
                {
                        r= sys_safecopyto(user_proc, gid, offset,
-                               (vir_bytes)&two_bytes[1], 1, D);
+                               (vir_bytes)&two_bytes[1], 1);
                        if (r != OK) {
                                panic("dp_pio16_nic2user: sys_safecopyto failed: %d", r);
                        }
@@ -1550,7 +1550,7 @@ vir_bytes count;
                        assert(bytes == 1);
                        *(u16_t *)two_bytes= inw(dep->de_data_port);
                        r= sys_safecopyto(user_proc, gid, offset,
-                               (vir_bytes)&two_bytes[0], 1, D);
+                               (vir_bytes)&two_bytes[0], 1);
                        if (r != OK)
                        {
                                panic("dp_pio16_nic2user: sys_safecopyto failed: %d",
@@ -1774,7 +1774,7 @@ void *loc_addr;
        int r;
 
        r= sys_safecopyfrom(user_proc, grant, offset,
-               (vir_bytes)loc_addr, count, D);
+               (vir_bytes)loc_addr, count);
        if (r != OK)
                panic("get_userdata: sys_safecopyfrom failed: %d", r);
 }
@@ -1791,7 +1791,7 @@ void *loc_addr;
        int r;
 
        r= sys_safecopyto(user_proc, grant, 0, (vir_bytes)loc_addr, 
-               count, D);
+               count);
        if (r != OK)
                panic("put_userdata: sys_safecopyto failed: %d", r);
 }
index 5b3bc066260a7c40354c3975ce0693cc05deed96..240bc0c4bb62d02355567ad4d95fa3f095fd2ff7 100644 (file)
@@ -192,7 +192,7 @@ static void get_userdata_s(int user_proc, cp_grant_id_t grant,
   vir_bytes len;
 
   len = (count > IOVEC_NR ? IOVEC_NR : count) * sizeof(iovec_t);
-  if ((rc = sys_safecopyfrom(user_proc, grant, 0, (vir_bytes)loc_addr, len, D)) != OK)
+  if ((rc = sys_safecopyfrom(user_proc, grant, 0, (vir_bytes)loc_addr, len)) != OK)
        panic(CopyErrMsg, rc);
   return;
 }
@@ -432,7 +432,7 @@ static void do_getstat_s(const message * mp)
   if (dep->de_mode == DEM_ENABLED) (*dep->de_getstatsf) (dep);
   if ((rc = sys_safecopyto(mp->m_source, mp->DL_GRANT, 0,
                        (vir_bytes)&dep->de_stat,
-                       (vir_bytes) sizeof(dep->de_stat), 0)) != OK)
+                       (vir_bytes) sizeof(dep->de_stat))) != OK)
         panic(CopyErrMsg, rc);
 
   reply_mess.m_type = DL_STAT_REPLY;
index 92d67f1bea3fdee73c08c3148b2a9d2d633d5873..e190048d3af6872437dea9b2de5d951766655f21 100644 (file)
@@ -119,7 +119,7 @@ void mem2user(dpeth_t *dep, buff_t *rxbuff)
 
        /* Reads from Rx buffer to user area */
        r= sys_safecopyto(iovp->iod_proc_nr, iovp->iod_iovec[ix].iov_grant, 0,
-               (vir_bytes)buffer, bytes, D);
+               (vir_bytes)buffer, bytes);
        if (r != OK)
                panic("mem2user: sys_safecopyto failed: %d", r);
        buffer += bytes;
@@ -149,7 +149,7 @@ void user2mem(dpeth_t *dep, buff_t *txbuff)
        bytes = iovp->iod_iovec[ix].iov_size;   /* Size of buffer */
        if (bytes > pktsize) bytes = pktsize;
        r= sys_safecopyfrom(iovp->iod_proc_nr, iovp->iod_iovec[ix].iov_grant,
-               0, (vir_bytes)buffer, bytes, D);
+               0, (vir_bytes)buffer, bytes);
        if (r != OK)
                panic("user2mem: sys_safecopyfrom failed: %d", r);
        buffer += bytes;
index 2220840bb3d229a6d8ef25e4040e53e11d63c8b5..e0fe93db965286681fab76d2687b7ab8315383b1 100644 (file)
@@ -615,7 +615,7 @@ int from_int;
        if ((r = sys_safecopyfrom(e->tx_message.m_source,
                                  e->tx_message.DL_GRANT, 0,
                                  (vir_bytes) iovec, e->tx_message.DL_COUNT *
-                                 sizeof(iovec_s_t), D)) != OK)
+                                 sizeof(iovec_s_t))) != OK)
        {
            panic("sys_safecopyfrom() failed: %d", r);
        }
@@ -640,7 +640,7 @@ int from_int;
                                     iovec[i].iov_grant, 0,
                                     (vir_bytes) e->tx_buffer +
                                     (tail * E1000_IOBUF_SIZE),
-                                     size, D)) != OK)
+                                     size)) != OK)
            {
                panic("sys_safecopyfrom() failed: %d", r);
            }
@@ -706,7 +706,7 @@ int from_int;
        if ((r = sys_safecopyfrom(e->rx_message.m_source,
                                  e->rx_message.DL_GRANT, 0,
                                  (vir_bytes) iovec, e->rx_message.DL_COUNT *
-                                 sizeof(iovec_s_t), D)) != OK)
+                                 sizeof(iovec_s_t))) != OK)
        {
            panic("sys_safecopyfrom() failed: %d", r);
        }
@@ -741,7 +741,7 @@ int from_int;
            if ((r = sys_safecopyto(e->rx_message.m_source, iovec[i].iov_grant,
                                   0, (vir_bytes) e->rx_buffer + bytes + 
                                   (cur * E1000_IOBUF_SIZE),
-                                   size, D)) != OK)
+                                   size)) != OK)
            {
                panic("sys_safecopyto() failed: %d", r);
            }
@@ -791,7 +791,7 @@ message *mp;
     stats.ets_OWC = 0;
 
     sys_safecopyto(mp->m_source, mp->DL_GRANT, 0, (vir_bytes)&stats,
-                   sizeof(stats), D);
+                   sizeof(stats));
     mp->m_type  = DL_STAT_REPLY;
     if((r=send(mp->m_source, mp)) != OK)
        panic("e1000_getstat: send() failed: %d", r);
index 10a174dccec13f9e26893791d0b02184797a96e9..81ebc6620fdff0ead7809120edc7c9289ddd2885 100644 (file)
@@ -33,8 +33,7 @@ int rule_ctl(int request, endpoint_t endpt, cp_grant_id_t grant)
 
                /* Copy in the rule. */
                if ((r = sys_safecopyfrom(endpt, grant, 0,
-                               (vir_bytes) &rules[i-1], sizeof(rules[0]),
-                               D)) != OK)
+                               (vir_bytes) &rules[i-1], sizeof(rules[0]))) != OK)
                        return r;
 
                /* Mark the rule as active, and return its number. */
@@ -45,7 +44,7 @@ int rule_ctl(int request, endpoint_t endpt, cp_grant_id_t grant)
        case FBDCDELRULE:
                /* Copy in the given rule number. */
                if ((r = sys_safecopyfrom(endpt, grant, 0, (vir_bytes) &i,
-                               sizeof(i), D)) != OK)
+                               sizeof(i))) != OK)
                        return r;
 
                /* Fail if the given rule number is not valid or in use.
@@ -64,7 +63,7 @@ int rule_ctl(int request, endpoint_t endpt, cp_grant_id_t grant)
                /* Copy in just the rule number from the given structure. */
                if ((r = sys_safecopyfrom(endpt, grant,
                                offsetof(struct fbd_rule, num), (vir_bytes) &i,
-                               sizeof(i), D)) != OK)
+                               sizeof(i))) != OK)
                        return r;
 
                /* Fail if the given rule number is not valid or in use.
@@ -76,7 +75,7 @@ int rule_ctl(int request, endpoint_t endpt, cp_grant_id_t grant)
 
                /* Copy out the entire rule as is. */
                return sys_safecopyto(endpt, grant, 0, (vir_bytes) &rules[i-1],
-                               sizeof(rules[0]), D);
+                               sizeof(rules[0]));
 
        default:
                return EINVAL;
index 81db0f5074c3e8a4906f57284435ae53a3ac7ee1..d2c966cd83455a43d6652370b14a4987ad0beeca 100644 (file)
@@ -87,10 +87,10 @@ static int carry(size_t size, int flag_rw)
 
        if (flag_rw == FLT_WRITE)
                return sys_safecopyfrom(who_e, grant_id, 0,
-                       (vir_bytes) buffer, size, D);
+                       (vir_bytes) buffer, size);
        else
                return sys_safecopyto(who_e, grant_id, 0,
-                       (vir_bytes) buffer, size, D);
+                       (vir_bytes) buffer, size);
 }
 
 /*===========================================================================*
@@ -111,11 +111,11 @@ static int vcarry(int grants, iovec_t *iov, int flag_rw, size_t size)
                if (flag_rw == FLT_WRITE)
                        r = sys_safecopyfrom(who_e,
                                (vir_bytes) iov[i].iov_addr, 0,
-                               (vir_bytes) bufp, bytes, D);
+                               (vir_bytes) bufp, bytes);
                else
                        r = sys_safecopyto(who_e,
                                (vir_bytes) iov[i].iov_addr, 0,
-                               (vir_bytes) bufp, bytes, D);
+                               (vir_bytes) bufp, bytes);
 
                if(r != OK)
                        return r;
@@ -190,7 +190,7 @@ static int do_vrdwt(int flag_rw)
        /* Extract informations. */
        grants = m_in.BDEV_COUNT;
        if((r = sys_safecopyfrom(who_e, grant_id, 0, (vir_bytes) iov_proc,
-               grants * sizeof(iovec_t), D)) != OK) {
+               grants * sizeof(iovec_t))) != OK) {
                panic("copying in grant vector failed: %d", r);
        }
 
@@ -260,7 +260,7 @@ static int do_ioctl(message *m)
 
                if(sys_safecopyto(who_e, (vir_bytes) grant_id, 0,
                                (vir_bytes) &sizepart,
-                               sizeof(struct partition), D) != OK) {
+                               sizeof(struct partition)) != OK) {
                        printf("Filter: DIOCGETP safecopyto failed\n");
                        return EIO;
                }
index e0f9bd64e28f7af796ae432f5c37f60c737b2db2..51572e55dd0f1defa4b99221a4d75463877a2be2 100644 (file)
@@ -513,7 +513,7 @@ static ssize_t f_transfer(
                if(proc_nr != SELF) {
                   s=sys_safecopyfrom(proc_nr, iov->iov_addr,
                        SECTOR_SIZE + iov_offset, (vir_bytes) &fmt_param,
-                       (phys_bytes) sizeof(fmt_param), D);
+                       (phys_bytes) sizeof(fmt_param));
                   if(s != OK)
                        panic("sys_safecopyfrom failed: %d", s);
                } else {
@@ -618,7 +618,7 @@ static ssize_t f_transfer(
                                if(proc_nr != SELF) {
                                   s=sys_safecopyfrom(proc_nr, *ug, *up,
                                        (vir_bytes) floppy_buf,
-                                        (phys_bytes) SECTOR_SIZE, D);
+                                        (phys_bytes) SECTOR_SIZE);
                                   if(s != OK)
                                        panic("sys_safecopyfrom failed: %d", s);
                                } else {
@@ -644,7 +644,7 @@ static ssize_t f_transfer(
                        if(proc_nr != SELF) {
                           s=sys_safecopyto(proc_nr, *ug, *up,
                                (vir_bytes) floppy_buf,
-                                (phys_bytes) SECTOR_SIZE, D);
+                                (phys_bytes) SECTOR_SIZE);
                        if(s != OK)
                                panic("sys_safecopyto failed: %d", s);
                        } else {
index 90cff2645507646e19940bcfdae873ecc6ea4850..20030c0137cf8381ce9f77f3ba9826f04f1a1f49 100644 (file)
@@ -1012,7 +1012,7 @@ static void fxp_writev_s(const message *mp, int from_int)
                        n= count-i;
                r= sys_safecopyfrom(iov_endpt, iov_grant, iov_offset,
                        (vir_bytes)fp->fxp_iovec_s,
-                       n * sizeof(fp->fxp_iovec_s[0]), D);
+                       n * sizeof(fp->fxp_iovec_s[0]));
                if (r != OK)
                        panic("fxp_writev: sys_safecopyfrom failed: %d", r);
 
@@ -1024,7 +1024,7 @@ static void fxp_writev_s(const message *mp, int from_int)
                        }
 
                        r= sys_safecopyfrom(iov_endpt, iovp->iov_grant,
-                               0, (vir_bytes)(txp->tx_buf+o), s, D);
+                               0, (vir_bytes)(txp->tx_buf+o), s);
                        if (r != OK) {
                                panic("fxp_writev_s: sys_safecopyfrom failed: %d", r);
                        }
@@ -1147,7 +1147,7 @@ int from_int;
                        n= count-i;
                r= sys_safecopyfrom(iov_endpt, iov_grant, iov_offset,
                        (vir_bytes)fp->fxp_iovec_s,
-                       n * sizeof(fp->fxp_iovec_s[0]), D);
+                       n * sizeof(fp->fxp_iovec_s[0]));
                if (r != OK)
                        panic("fxp_readv_s: sys_safecopyfrom failed: %d", r);
 
@@ -1161,7 +1161,7 @@ int from_int;
                        }
 
                        r= sys_safecopyto(iov_endpt, iovp->iov_grant,
-                               0, (vir_bytes)(rfdp->rfd_buf+o), s, D);
+                               0, (vir_bytes)(rfdp->rfd_buf+o), s);
                        if (r != OK)
                        {
                                panic("fxp_readv: sys_safecopyto failed: %d", r);
@@ -1447,7 +1447,7 @@ static void fxp_getstat_s(message *mp)
        stats.ets_OWC= fp->fxp_stat.sc_tx_latecol;
 
        r= sys_safecopyto(mp->m_source, mp->DL_GRANT, 0, (vir_bytes)&stats,
-               sizeof(stats), D);
+               sizeof(stats));
        if (r != OK)
                panic("fxp_getstat_s: sys_safecopyto failed: %d", r);
 
index 35700eacb41d72094cef59068e96442e33ecf29e..0dd6a27e4870f70bf5a2724fb0e29239271379d7 100644 (file)
@@ -87,7 +87,7 @@ static int hello_transfer(endpoint_t endpt, int opcode, u64_t position,
         case DEV_GATHER_S:
             ret = sys_safecopyto(endpt, (cp_grant_id_t) iov->iov_addr, 0,
                                 (vir_bytes) (HELLO_MESSAGE + ex64lo(position)),
-                                 bytes, D);
+                                 bytes);
             iov->iov_size -= bytes;
             break;
 
index b0531bf915c2d6b58021a7f5535d3304c405e8a1..fc64b0650a57c13fc2cff0f7e3f0d46916703c02 100644 (file)
@@ -1012,7 +1012,7 @@ static void do_vread_s(const message *mp)
    r = sys_safecopyfrom(mp->m_source, mp->DL_GRANT, 0,
                         (vir_bytes)ec->read_iovec.iod_iovec,
                         (count > IOVEC_NR ? IOVEC_NR : count) *
-                        sizeof(iovec_s_t), D);
+                        sizeof(iovec_s_t));
    if (r != OK)
        panic("do_vread_s: sys_safecopyfrom failed: %d", r);
    ec->read_iovec.iod_iovec_s    = count;
@@ -1130,7 +1130,7 @@ int from_int;
    r = sys_safecopyfrom(mp->m_source, mp->DL_GRANT, 0,
                         (vir_bytes)ec->write_iovec.iod_iovec,
                         (count > IOVEC_NR ? IOVEC_NR : count) *
-                        sizeof(iovec_s_t), D);
+                        sizeof(iovec_s_t));
    if (r != OK)
        panic("do_vwrite_s: sys_safecopyfrom failed: %d", r);
    ec->write_iovec.iod_iovec_s    = count;
@@ -1205,7 +1205,7 @@ vir_bytes count;
       
       if ( (r=sys_safecopyfrom(iovp->iod_proc_nr,
                                iovp->iod_iovec[i].iov_grant, offset,
-                               nic_addr, bytes, D )) != OK )
+                               nic_addr, bytes )) != OK )
          panic("ec_user2nic: sys_safecopyfrom failed: %d", r);
 
       count -= bytes;
@@ -1245,7 +1245,7 @@ vir_bytes count;
       if (bytes > count)
          bytes = count;
       if ( (r=sys_safecopyto( iovp->iod_proc_nr, iovp->iod_iovec[i].iov_grant,
-                              offset, nic_addr, bytes, D )) != OK )
+                              offset, nic_addr, bytes )) != OK )
          panic("ec_nic2user: sys_safecopyto failed: %d", r);
       
       count -= bytes;
@@ -1295,7 +1295,7 @@ iovec_dat_t *iovp;
                         (vir_bytes)iovp->iod_iovec,
                         (iovp->iod_iovec_s > IOVEC_NR ?
                          IOVEC_NR : iovp->iod_iovec_s) *
-                        sizeof(iovec_s_t), D);
+                        sizeof(iovec_s_t));
    if (r != OK)
        panic("ec_next_iovec: sys_safecopyfrom failed: %d", r);
 }
@@ -1313,7 +1313,7 @@ message *mp;
    ec= &ec_state;
 
    r = sys_safecopyto(mp->m_source, mp->DL_GRANT, 0,
-                      (vir_bytes)&ec->eth_stat, sizeof(ec->eth_stat), D);
+                      (vir_bytes)&ec->eth_stat, sizeof(ec->eth_stat));
 
    if (r != OK)
        panic("do_getstat_s: sys_safecopyto failed: %d", r);
index 3dbc887b519c36713679892298cd88d057e35a53..44f2d55cf5fcca2c2d3950f35574fd0ad33015a5 100644 (file)
@@ -159,7 +159,7 @@ subwrite(struct logdevice *log, int count, endpoint_t endpt,
        }
        else {
                if((r=sys_safecopyfrom(endpt, grant, offset,
-                       (vir_bytes)buf, count, D)) != OK)
+                       (vir_bytes)buf, count)) != OK)
                        return r;
        }
 
@@ -263,7 +263,7 @@ subread(struct logdevice *log, int count, endpoint_t endpt,
 
        buf = log->log_buffer + log->log_read;
        if((r=sys_safecopyto(endpt, grant, offset,
-               (vir_bytes)buf, count, D)) != OK)
+               (vir_bytes)buf, count)) != OK)
                return r;
 
        LOGINC(log->log_read, count);
index 5daa46ab44642def5247c09f525a200b7a5ccfad..ff76595edf5ab141592f786efde0417d05be22c6 100644 (file)
@@ -278,10 +278,10 @@ static int m_transfer(
            if (position + count > dv_size) count = dv_size - position;
            if (opcode == DEV_GATHER_S) {       /* copy actual data */
                r=sys_safecopyto(endpt, grant, vir_offset,
-                 dev_vaddr + position, count, D);
+                 dev_vaddr + position, count);
            } else {
                r=sys_safecopyfrom(endpt, grant, vir_offset,
-                 dev_vaddr + position, count, D);
+                 dev_vaddr + position, count);
            }
            if(r != OK) {
               panic("I/O copy failed: %d", r);
@@ -339,10 +339,10 @@ static int m_transfer(
 
            if (opcode == DEV_GATHER_S) {                       /* copy data */
                   s=sys_safecopyto(endpt, grant,
-                      vir_offset, (vir_bytes) vaddr+page_off, subcount, D);
+                      vir_offset, (vir_bytes) vaddr+page_off, subcount);
            } else {
                   s=sys_safecopyfrom(endpt, grant,
-                      vir_offset, (vir_bytes) vaddr+page_off, subcount, D);
+                      vir_offset, (vir_bytes) vaddr+page_off, subcount);
            }
            if(s != OK)
                return s;
@@ -358,7 +358,7 @@ static int m_transfer(
                while (left > 0) {
                    chunk = (left > ZERO_BUF_SIZE) ? ZERO_BUF_SIZE : left;
                     s=sys_safecopyto(endpt, grant,
-                      vir_offset+suboffset, (vir_bytes) dev_zero, chunk, D);
+                      vir_offset+suboffset, (vir_bytes) dev_zero, chunk);
                    if(s != OK)
                        return s;
                    left -= chunk;
@@ -480,10 +480,10 @@ static int m_block_transfer(
        if (position + count > dv_size) count = dv_size - position;
        if (!do_write) {        /* copy actual data */
                r=sys_safecopyto(endpt, grant, vir_offset,
-                 dev_vaddr + position, count, D);
+                 dev_vaddr + position, count);
        } else {
                r=sys_safecopyfrom(endpt, grant, vir_offset,
-                 dev_vaddr + position, count, D);
+                 dev_vaddr + position, count);
        }
        if(r != OK) {
                panic("I/O copy failed: %d", r);
@@ -582,7 +582,7 @@ static int m_block_ioctl(dev_t minor, unsigned int request, endpoint_t endpt,
 
   /* Get request structure */
   s= sys_safecopyfrom(endpt, grant, 0, (vir_bytes)&ramdev_size,
-       sizeof(ramdev_size), D);
+       sizeof(ramdev_size));
   if (s != OK)
        return s;
   if(m_vaddrs[minor] && !cmp64(dv->dv_size, cvul64(ramdev_size))) {
index 2df330bf0eddae9816371a7a7592a71afd289439..06f260c29f88ee5cca2fa7b6b66e648e21ac219c 100644 (file)
@@ -1210,7 +1210,7 @@ static void or_writev_s (message * mp, int from_int) {
 
                cps = sys_safecopyfrom(mp->m_source, mp->DL_GRANT, iov_offset,
                        (vir_bytes) orp->or_iovec_s, 
-                       n * sizeof(orp->or_iovec_s[0]), D);
+                       n * sizeof(orp->or_iovec_s[0]));
                if (cps != OK) 
                        printf("orinoco: sys_safecopyfrom failed: %d\n", cps);
 
@@ -1221,7 +1221,7 @@ static void or_writev_s (message * mp, int from_int) {
                        }
 
                        cps = sys_safecopyfrom(mp->m_source, iovp->iov_grant,
-                                       0, (vir_bytes) databuf + o, s, D);
+                                       0, (vir_bytes) databuf + o, s);
                        if (cps != OK) 
                                printf("orinoco: sys_safecopyfrom failed:%d\n",
                                                cps);
@@ -1601,7 +1601,7 @@ static void or_readv_s (message * mp, int from_int)
 
                cps = sys_safecopyfrom(mp->m_source, mp->DL_GRANT, iov_offset, 
                                (vir_bytes)orp->or_iovec_s,
-                               n * sizeof(orp->or_iovec_s[0]), D);
+                               n * sizeof(orp->or_iovec_s[0]));
                if (cps != OK) 
                        panic("orinoco: warning: sys_safecopytp failed: %d", cps);
 
@@ -1612,7 +1612,7 @@ static void or_readv_s (message * mp, int from_int)
                                s = length - size;
                        }
                        cps = sys_safecopyto(mp->m_source, iovp->iov_grant, 0, 
-                                       (vir_bytes) databuf + o, s, D);
+                                       (vir_bytes) databuf + o, s);
                        if (cps != OK) 
                                panic("orinoco: warning: sys_safecopy failed: %d", cps);
 
@@ -1779,7 +1779,7 @@ static void or_getstat_s (message * mp) {
        stats = orp->or_stat;
 
        r = sys_safecopyto(mp->m_source, mp->DL_GRANT, 0, 
-                               (vir_bytes) &stats, sizeof(stats), D);
+                               (vir_bytes) &stats, sizeof(stats));
        if(r != OK) {
                panic("or_getstat_s: sys_safecopyto failed: %d", r);
        }
index d93ecb96591698c8f499166a851a8d840abf5684..44fd49a599bf2cc2866c2ca823e898cdb61b12e4 100644 (file)
@@ -247,7 +247,7 @@ message *mp;
                if (len > name_len)
                        len= name_len;
                r= sys_safecopyto(mp->m_source, name_gid, 0, (vir_bytes)name,
-                       len, D);
+                       len);
        }
 
        mp->m_type= r;
@@ -283,7 +283,7 @@ message *mp;
                if (len > name_len)
                        len= name_len;
                r= sys_safecopyto(mp->m_source, gid, 0,
-                       (vir_bytes)name, len, D);
+                       (vir_bytes)name, len);
        }
 
        mp->m_type= r;
@@ -322,7 +322,7 @@ message *mp;
        gid= mp->m1_i1;
 
        r= sys_safecopyfrom(mp->m_source, gid, 0, (vir_bytes)&pci_acl[i].acl,
-               sizeof(pci_acl[i].acl), D);
+               sizeof(pci_acl[i].acl));
        if (r != OK)
        {
                printf("PCI: do_set_acl: safecopyfrom failed\n");
index 86a311dad8e6bc456a148aa203d8f232fdb2d969..d753faf36c6f038bcc8c3a6899c1504924356fa1 100644 (file)
@@ -178,7 +178,7 @@ int sef_cb_init_fresh(int type, sef_init_info_t *info)
 
        /* Map all the services in the boot image. */
        if((r = sys_safecopyfrom(RS_PROC_NR, info->rproctab_gid, 0,
-               (vir_bytes) rprocpub, sizeof(rprocpub), S)) != OK) {
+               (vir_bytes) rprocpub, sizeof(rprocpub))) != OK) {
                panic("sys_safecopyfrom failed: %d", r);
        }
        for(i=0;i < NR_BOOT_PROCS;i++) {
index 107cedd2204d9ae6664c436a010f49d3fda19e7f..5ab2a9491c46c84a6bcafea41c6c80800d7f9d69 100644 (file)
@@ -412,7 +412,7 @@ static void prepare_output()
   if ( (chunk = user_left) > sizeof obuf) chunk = sizeof obuf;
 
   s=sys_safecopyfrom(caller, grant_nr, user_vir_d, (vir_bytes) obuf,
-       chunk, D);
+       chunk);
 
   if(s != OK) {
        done_status = EFAULT;
index ff9c8649a0b91055cfb57667ca609a8ccd7ce355..f2a65db8c51f5ce2201d2a23c04e9c73d76244d0 100644 (file)
@@ -173,7 +173,7 @@ static int r_transfer(
                if (opcode == DEV_GATHER_S) {
                    random_getbytes(random_buf, chunk);
                    r= sys_safecopyto(endpt, grant, vir_offset,
-                       (vir_bytes) random_buf, chunk, D);
+                       (vir_bytes) random_buf, chunk);
                    if (r != OK)
                    {
                        printf("random: sys_safecopyto failed for proc %d, "
@@ -182,7 +182,7 @@ static int r_transfer(
                    }
                } else if (opcode == DEV_SCATTER_S) {
                    r= sys_safecopyfrom(endpt, grant, vir_offset,
-                       (vir_bytes) random_buf, chunk, D);
+                       (vir_bytes) random_buf, chunk);
                    if (r != OK)
                    {
                        printf("random: sys_safecopyfrom failed for proc %d, "
index 100312b015030fc01ea1a24310c4bdc308928336..aef58df336ba73b89dfd0bab3cda5726a34dca29 100644 (file)
@@ -869,7 +869,7 @@ static void rl_readv_s(const message *mp, int from_int)
 
                cps = sys_safecopyfrom(mp->m_source, mp->DL_GRANT, iov_offset,
                        (vir_bytes) rep->re_iovec_s,
-                       n * sizeof(rep->re_iovec_s[0]), D);
+                       n * sizeof(rep->re_iovec_s[0]));
                if (cps != OK) {
                        panic("rl_readv_s: sys_safecopyfrom failed: %d",
                                cps);
@@ -902,14 +902,14 @@ static void rl_readv_s(const message *mp, int from_int)
 
                                cps = sys_safecopyto(mp->m_source,
                                        iovp->iov_grant, 0, 
-                                       (vir_bytes) rep->v_re_rx_buf+o, s1, D);
+                                       (vir_bytes) rep->v_re_rx_buf+o, s1);
                                if (cps != OK) { 
                                        panic("rl_readv_s: sys_safecopyto failed: %d",
                                        cps);
                                }
                                cps = sys_safecopyto(mp->m_source,
                                        iovp->iov_grant, s1, 
-                                       (vir_bytes) rep->v_re_rx_buf, s-s1, S);
+                                       (vir_bytes) rep->v_re_rx_buf, s-s1);
                                if (cps != OK) {
                                        panic("rl_readv_s: sys_safecopyto failed: %d", cps);
                                }
@@ -918,7 +918,7 @@ static void rl_readv_s(const message *mp, int from_int)
                        {
                                cps = sys_safecopyto(mp->m_source,
                                        iovp->iov_grant, 0,
-                                       (vir_bytes) rep->v_re_rx_buf+o, s, D);
+                                       (vir_bytes) rep->v_re_rx_buf+o, s);
                                if (cps != OK)
                                        panic("rl_readv_s: sys_safecopyto failed: %d", cps);
                        }
@@ -1033,7 +1033,7 @@ static void rl_writev_s(const message *mp, int from_int)
                        n= count-i;
                cps = sys_safecopyfrom(mp->m_source, mp->DL_GRANT, iov_offset,
                        (vir_bytes) rep->re_iovec_s,
-                       n * sizeof(rep->re_iovec_s[0]), D);
+                       n * sizeof(rep->re_iovec_s[0]));
                if (cps != OK) {
                        panic("rl_writev_s: sys_safecopyfrom failed: %d", cps);
                }
@@ -1045,7 +1045,7 @@ static void rl_writev_s(const message *mp, int from_int)
                                panic("invalid packet size");
                        }
                        cps = sys_safecopyfrom(mp->m_source, iovp->iov_grant,
-                               0, (vir_bytes) ret, s, D);
+                               0, (vir_bytes) ret, s);
                        if (cps != OK) { 
                                panic("rl_writev_s: sys_safecopyfrom failed: %d",       cps);
                        }
@@ -1529,7 +1529,7 @@ message *mp;
        stats= rep->re_stat;
 
        r = sys_safecopyto(mp->m_source, mp->DL_GRANT, 0,
-               (vir_bytes) &stats, sizeof(stats), D);
+               (vir_bytes) &stats, sizeof(stats));
        if (r != OK)
                panic("rl_getstat_s: sys_safecopyto failed: %d", r);
 
index 20abcfbe615eddb89360ce6cb2903399c9f4c7d8..5ef8ae419dceb02656cf03eb92ace162aafc5da6 100644 (file)
@@ -1221,7 +1221,7 @@ readvs_loop:
                        n = count-i;
                cps = sys_safecopyfrom(mp->m_source, mp->DL_GRANT, iov_offset,
                        (vir_bytes) rep->re_iovec_s,
-                       n * sizeof(rep->re_iovec_s[0]), D);
+                       n * sizeof(rep->re_iovec_s[0]));
                if (cps != OK) {
                        panic("rl_readv_s: sys_safecopyfrom failed: %d",                                cps);
                }
@@ -1234,7 +1234,7 @@ readvs_loop:
                        }
 
                        cps = sys_safecopyto(mp->m_source, iovp->iov_grant, 0,
-                               (vir_bytes) rep->re_rx[index].v_ret_buf + size, s, D);
+                               (vir_bytes) rep->re_rx[index].v_ret_buf + size, s);
                        if (cps != OK)
                                panic("rl_readv_s: sys_safecopyto failed: %d", cps);
 
@@ -1357,7 +1357,7 @@ static void rl_writev_s(const message *mp, int from_int)
                        n = count - i;
                cps = sys_safecopyfrom(mp->m_source, mp->DL_GRANT, iov_offset,
                        (vir_bytes) rep->re_iovec_s,
-                       n * sizeof(rep->re_iovec_s[0]), D);
+                       n * sizeof(rep->re_iovec_s[0]));
                if (cps != OK) {
                        panic("rl_writev_s: sys_safecopyfrom failed: %d",                               cps);
                }
@@ -1368,7 +1368,7 @@ static void rl_writev_s(const message *mp, int from_int)
                                panic("invalid packet size");
 
                        cps = sys_safecopyfrom(mp->m_source, iovp->iov_grant,
-                               0, (vir_bytes) ret, s, D);
+                               0, (vir_bytes) ret, s);
                        if (cps != OK) {
                                panic("rl_writev_s: sys_safecopyfrom failed: %d", cps);
                        }
@@ -1519,7 +1519,7 @@ message *mp;
        stats = rep->re_stat;
 
        r = sys_safecopyto(mp->m_source, mp->DL_GRANT, 0,
-               (vir_bytes) &stats, sizeof(stats), D);
+               (vir_bytes) &stats, sizeof(stats));
        if (r != OK)
                panic("rl_getstat_s: sys_safecopyto failed: %d", r);
 
index 5726d0a4cf5c1309876e355827e85c2a958466a2..05971f634efacdb47d9573a4e0f47cdcc421ecee 100644 (file)
@@ -172,7 +172,7 @@ int try;
   do {
        if (count > sizeof(buf)) count = sizeof(buf);
        if ((result = sys_safecopyfrom(tp->tty_outcaller, tp->tty_outgrant,
-               tp->tty_outoffset, (vir_bytes) buf, count, D)) != OK)
+               tp->tty_outoffset, (vir_bytes) buf, count)) != OK)
                break;
        tp->tty_outoffset += count;
        tbuf = buf;
@@ -813,7 +813,7 @@ void do_video(message *m)
 
                        r = sys_safecopyfrom(m->m_source,
                                (cp_grant_id_t) m->IO_GRANT, 0,
-                               (vir_bytes) &mapreqvm, sizeof(mapreqvm), D);
+                               (vir_bytes) &mapreqvm, sizeof(mapreqvm));
 
                        if (r != OK)
                        {
@@ -834,7 +834,7 @@ void do_video(message *m)
                                if((r = sys_safecopyto(m->m_source,
                                  (cp_grant_id_t) m->IO_GRANT, 0,
                                  (vir_bytes) &mapreqvm,
-                                 sizeof(mapreqvm), D)) != OK) {
+                                 sizeof(mapreqvm))) != OK) {
                                  printf("tty: sys_safecopyto failed\n");
                                }
                        } else {
@@ -1204,7 +1204,7 @@ message *m;
   result = ga_program(seq1);   /* bring font memory into view */
 
   if(sys_safecopyfrom(m->m_source, (cp_grant_id_t) m->IO_GRANT, 0,
-       (vir_bytes) font_memory, GA_FONT_SIZE, D) != OK) {
+       (vir_bytes) font_memory, GA_FONT_SIZE) != OK) {
        printf("tty: copying from %d failed\n", m->m_source);
        return EFAULT;
   }
index 534f3e33718d7cb3e09e2b7cd00dd58614e8ab8d..c66d244fd46e1605d9744ab958fd949c7240628f 100644 (file)
@@ -265,7 +265,7 @@ message *m;
                if (n <= 0)
                        panic("do_kbd(READ): bad n: %d", n);
                r= sys_safecopyto(m->m_source, (cp_grant_id_t) m->IO_GRANT, 0, 
-                       (vir_bytes) &kbdp->buf[kbdp->offset], n, D);
+                       (vir_bytes) &kbdp->buf[kbdp->offset], n);
                if (r == OK)
                {
                        kbdp->offset= (kbdp->offset+n) % KBD_BUFSZ;
@@ -292,7 +292,7 @@ message *m;
                for (i= 0; i<m->COUNT; i++)
                {
                        r= sys_safecopyfrom(m->m_source, (cp_grant_id_t)
-                               m->IO_GRANT, i, (vir_bytes) &c, 1, D);
+                               m->IO_GRANT, i, (vir_bytes) &c, 1);
                        if (r != OK)
                                break;
                        kbc_cmd1(KBC_WRITE_AUX, c);
@@ -330,7 +330,7 @@ message *m;
                        
                        r= sys_safecopyfrom(m->m_source, (cp_grant_id_t)
                                m->IO_GRANT, 0, (vir_bytes) &leds,
-                               sizeof(leds), D);
+                               sizeof(leds));
                        if (r != OK)
                                break;
                        b= 0;
@@ -365,7 +365,7 @@ message *m;
 
                        r = sys_safecopyfrom(m->m_source, (cp_grant_id_t)
                                m->IO_GRANT, 0, (vir_bytes) &bell,
-                               sizeof(bell), D);
+                               sizeof(bell));
                        if (r != OK)
                                break;
 
@@ -412,7 +412,7 @@ message *m;
                        panic("kbd_status: bad n: %d", n);
                kbdp->req_size= 0;
                r= sys_safecopyto(kbdp->incaller, kbdp->req_grant, 0,
-                       (vir_bytes)&kbdp->buf[kbdp->offset], n, D);
+                       (vir_bytes)&kbdp->buf[kbdp->offset], n);
                if (r == OK)
                {
                        kbdp->offset= (kbdp->offset+n) % KBD_BUFSZ;
@@ -1060,7 +1060,7 @@ message *m;
 {
 /* Load a new keymap. */
   return sys_safecopyfrom(m->m_source, (cp_grant_id_t) m->IO_GRANT,
-       0, (vir_bytes) keymap, (vir_bytes) sizeof(keymap), D);
+       0, (vir_bytes) keymap, (vir_bytes) sizeof(keymap));
 }
 
 /*===========================================================================*
index 6adb2af8dcd882b4b80b525d94f148602f42c6e0..9d718214bff8c4e9d908952ca1fad7933d2109bc 100644 (file)
@@ -243,7 +243,7 @@ static int pty_write(tty_t *tp, int try)
 
        /* Copy from user space to the PTY output buffer. */
        if ((s = sys_safecopyfrom(tp->tty_outcaller, tp->tty_outgrant,
-               tp->tty_outoffset, (vir_bytes) pp->ohead, count, D))!=OK) {
+               tp->tty_outoffset, (vir_bytes) pp->ohead, count))!=OK) {
                break;
        }
 
@@ -320,7 +320,7 @@ static void pty_start(pty_t *pp)
 
        /* Copy from the output buffer to the readers address space. */
        if((s = sys_safecopyto(pp->rdcaller, pp->rdgrant,
-               pp->rdoffset, (vir_bytes) pp->otail, count, D)) != OK) {
+               pp->rdoffset, (vir_bytes) pp->otail, count)) != OK) {
                break;
        }
        pp->rdoffset += count;
@@ -389,7 +389,7 @@ static int pty_read(tty_t *tp, int try)
 
        /* Transfer one character to 'c'. */
        if ((s = sys_safecopyfrom(pp->wrcaller, pp->wrgrant, pp->wroffset,
-               (vir_bytes) &c, 1, D)) != OK) {
+               (vir_bytes) &c, 1)) != OK) {
                printf("pty: safecopy failed (error %d)\n", s);
                break;
        }
index 6ee1a65ead8f3ac379d2dca683730ec3bec55eeb..f9b586301b412809581a88de7a113eef47cbf5d8 100644 (file)
@@ -249,7 +249,7 @@ static int rs_write(register tty_t *tp, int try)
 
        /* Copy from user space to the RS232 output buffer. */
        sys_safecopyfrom(tp->tty_outcaller, tp->tty_outgrant, 
-               tp->tty_outoffset, (vir_bytes) rs->ohead, count, D);
+               tp->tty_outoffset, (vir_bytes) rs->ohead, count);
 
        /* Perform output processing on the output buffer. */
        out_process(tp, rs->obuf, rs->ohead, bufend(rs->obuf), &count, &ocount);
index 67396b51c201c1eaf5ab19dca9bcaaf921144639..d5f3696a127e703742ca958b4fa10b7b6ddeb750 100644 (file)
@@ -607,7 +607,7 @@ message *m_ptr;                     /* pointer to message sent to task */
     case TCGETS:
        /* Get the termios attributes. */
        r = sys_safecopyto(m_ptr->m_source, (cp_grant_id_t) m_ptr->IO_GRANT, 0,
-               (vir_bytes) &tp->tty_termios, (vir_bytes) size, D);
+               (vir_bytes) &tp->tty_termios, (vir_bytes) size);
        break;
 
     case TCSETSW:
@@ -628,14 +628,14 @@ message *m_ptr;                   /* pointer to message sent to task */
     case TCSETS:
        /* Set the termios attributes. */
        r = sys_safecopyfrom(m_ptr->m_source, (cp_grant_id_t) m_ptr->IO_GRANT,
-               0, (vir_bytes) &tp->tty_termios, (vir_bytes) size, D);
+               0, (vir_bytes) &tp->tty_termios, (vir_bytes) size);
        if (r != OK) break;
        setattr(tp);
        break;
 
     case TCFLSH:
        r = sys_safecopyfrom(m_ptr->m_source, (cp_grant_id_t) m_ptr->IO_GRANT,
-               0, (vir_bytes) &param.i, (vir_bytes) size, D);
+               0, (vir_bytes) &param.i, (vir_bytes) size);
        if (r != OK) break;
        switch (param.i) {
            case TCIFLUSH:      tty_icancel(tp);                            break;
@@ -647,7 +647,7 @@ message *m_ptr;                     /* pointer to message sent to task */
 
     case TCFLOW:
        r = sys_safecopyfrom(m_ptr->m_source, (cp_grant_id_t) m_ptr->IO_GRANT,
-               0, (vir_bytes) &param.i, (vir_bytes) size, D);
+               0, (vir_bytes) &param.i, (vir_bytes) size);
        if (r != OK) break;
        switch (param.i) {
            case TCOOFF:
@@ -672,12 +672,12 @@ message *m_ptr;                   /* pointer to message sent to task */
 
     case TIOCGWINSZ:
        r = sys_safecopyto(m_ptr->m_source, (cp_grant_id_t) m_ptr->IO_GRANT, 0,
-               (vir_bytes) &tp->tty_winsize, (vir_bytes) size, D);
+               (vir_bytes) &tp->tty_winsize, (vir_bytes) size);
        break;
 
     case TIOCSWINSZ:
        r = sys_safecopyfrom(m_ptr->m_source, (cp_grant_id_t) m_ptr->IO_GRANT,
-               0, (vir_bytes) &tp->tty_winsize, (vir_bytes) size, D);
+               0, (vir_bytes) &tp->tty_winsize, (vir_bytes) size);
        sigchar(tp, SIGWINCH, 0);
        break;
 
@@ -928,7 +928,7 @@ register tty_t *tp;         /* pointer to terminal to read from */
                        sys_safecopyto(tp->tty_incaller,
                                tp->tty_ingrant, tp->tty_inoffset,
                                (vir_bytes) buf,
-                               (vir_bytes) buflen(buf), D);
+                               (vir_bytes) buflen(buf));
                        tp->tty_inoffset += buflen(buf);
                        tp->tty_incum += buflen(buf);
                        bp = buf;
@@ -951,7 +951,7 @@ register tty_t *tp;         /* pointer to terminal to read from */
        count = bp - buf;
        sys_safecopyto(tp->tty_incaller,
                tp->tty_ingrant, tp->tty_inoffset,
-               (vir_bytes) buf, (vir_bytes) count, D);
+               (vir_bytes) buf, (vir_bytes) count);
        tp->tty_inoffset += count;
        tp->tty_incum += count;
   }
@@ -1393,7 +1393,7 @@ tty_t *tp;
        if (tp->tty_ioreq == TCSETSF) tty_icancel(tp);
        result = sys_safecopyfrom(tp->tty_iocaller, tp->tty_iogrant, 0,
                (vir_bytes) &tp->tty_termios,
-               (vir_bytes) sizeof(tp->tty_termios), D);
+               (vir_bytes) sizeof(tp->tty_termios));
        if (result == OK) setattr(tp);
   }
   tp->tty_ioreq = 0;
index 19b0ab63a196e4398f253a444bd838790359857c..2955fe5a33e6a9549603d185b6a6bee0fac9c5f1 100644 (file)
@@ -288,7 +288,7 @@ static int finish_req(int conn, int req, int *code)
                                        hgcm_conn[conn].req[req].grant, 0,
                                        (vir_bytes)
                                        hgcm_conn[conn].req[req].param,
-                                       count * sizeof(vbox_param_t), D);
+                                       count * sizeof(vbox_param_t));
                        }
                }
 
@@ -372,7 +372,7 @@ static int do_open(message *m_ptr, int ipc_status, int *code)
        connreq = (struct VMMDevHGCMConnect *) hgcm_conn[conn].req[0].ptr;
        connreq->type = VMMDEV_HGCM_SVCLOC_LOCALHOST_EXISTING;
        if ((r = sys_safecopyfrom(m_ptr->m_source, m_ptr->VBOX_GRANT, 0,
-                       (vir_bytes) connreq->name, m_ptr->VBOX_COUNT, D)) !=
+                       (vir_bytes) connreq->name, m_ptr->VBOX_COUNT)) !=
                        OK) {
                free_conn(conn);
 
@@ -576,7 +576,7 @@ static int do_call(message *m_ptr, int ipc_status, int *code)
        if (count > 0) {
                if ((r = sys_safecopyfrom(m_ptr->m_source, m_ptr->VBOX_GRANT,
                                0, (vir_bytes) hgcm_conn[conn].req[req].param,
-                               count * sizeof(vbox_param_t), D)) != OK)
+                               count * sizeof(vbox_param_t))) != OK)
                        return r;
        }
 
index 3170accb8046998356203a3d78d3e593a50b71ba..ef9ad8f2709ef87e255b3041a381139bc1672f34 100644 (file)
 
 /* Field names for SYS_SAFECOPY* */
 #define SCP_FROM_TO    m2_i1   /* from/to whom? */
-#define SCP_SEG                m2_i2   /* my own segment */
+#define SCP_SEG_OBSOLETE m2_i2 /* my own segment */
 #define SCP_GID                m2_i3   /* grant id */
 #define SCP_OFFSET     m2_l1   /* offset within grant */
 #define        SCP_ADDRESS     m2_p1   /* my own address */
index b427cd8cc80c36c1b2cb20437a11f445b95bd305..4635669eee30e5809664ca03dea354364bdbed6f 100644 (file)
@@ -148,9 +148,9 @@ int sys_physcopy(endpoint_t src_proc, int src_seg, vir_bytes src_vir,
 
 /* Grant-based copy functions. */
 int sys_safecopyfrom(endpoint_t source, cp_grant_id_t grant, vir_bytes
-       grant_offset, vir_bytes my_address, size_t bytes, int my_seg);
+       grant_offset, vir_bytes my_address, size_t bytes);
 int sys_safecopyto(endpoint_t dest, cp_grant_id_t grant, vir_bytes
-       grant_offset, vir_bytes my_address, size_t bytes, int my_seg);
+       grant_offset, vir_bytes my_address, size_t bytes);
 int sys_vsafecopy(struct vscp_vec *copyvec, int elements);
 
 int sys_memset(endpoint_t who, unsigned long pattern,
index 59b1b5b4e3fbbc7d6389797cd87552bb4ac1a084..3812afc41739d63add894af6004519d49c3ad0ac 100644 (file)
@@ -3,7 +3,6 @@
  *
  * The parameters for this kernel call are:
  *     SCP_FROM_TO     other endpoint
- *     SCP_SEG         segment in own address space
  *     SCP_GID         grant id
  *     SCP_OFFSET      offset within granted space
  *     SCP_ADDRESS     address in own address space
@@ -24,7 +23,7 @@
 #define MEM_TOP 0xFFFFFFFFUL
 
 static int safecopy(struct proc *, endpoint_t, endpoint_t,
-       cp_grant_id_t, int, int, size_t, vir_bytes, vir_bytes, int);
+       cp_grant_id_t, size_t, vir_bytes, vir_bytes, int);
 
 #define HASGRANTTABLE(gr) \
        (priv(gr) && priv(gr)->s_grant_table)
@@ -226,12 +225,11 @@ endpoint_t *e_granter;            /* new granter (magic grants) */
 /*===========================================================================*
  *                             safecopy                                     *
  *===========================================================================*/
-static int safecopy(caller, granter, grantee, grantid, src_seg, dst_seg, bytes,
+static int safecopy(caller, granter, grantee, grantid, bytes,
        g_offset, addr, access)
 struct proc * caller;
 endpoint_t granter, grantee;
 cp_grant_id_t grantid;
-int src_seg, dst_seg;
 size_t bytes;
 vir_bytes g_offset, addr;
 int access;                    /* CPF_READ for a copy from granter to grantee, CPF_WRITE
@@ -279,8 +277,8 @@ int access;                 /* CPF_READ for a copy from granter to grantee, CPF_WRITE
        granter = new_granter;
 
        /* Now it's a regular copy. */
-       v_src.segment = src_seg;
-       v_dst.segment = dst_seg;
+       v_src.segment = D;
+       v_dst.segment = D;
        v_src.proc_nr_e = *src;
        v_dst.proc_nr_e = *dst;
 
@@ -347,7 +345,7 @@ int access;                 /* CPF_READ for a copy from granter to grantee, CPF_WRITE
 int do_safecopy_to(struct proc * caller, message * m_ptr)
 {
        return safecopy(caller, m_ptr->SCP_FROM_TO, caller->p_endpoint,
-               (cp_grant_id_t) m_ptr->SCP_GID, m_ptr->SCP_SEG, D,
+               (cp_grant_id_t) m_ptr->SCP_GID, 
                m_ptr->SCP_BYTES, m_ptr->SCP_OFFSET,
                (vir_bytes) m_ptr->SCP_ADDRESS, CPF_WRITE);
 }
@@ -358,7 +356,7 @@ int do_safecopy_to(struct proc * caller, message * m_ptr)
 int do_safecopy_from(struct proc * caller, message * m_ptr)
 {
        return safecopy(caller, m_ptr->SCP_FROM_TO, caller->p_endpoint,
-               (cp_grant_id_t) m_ptr->SCP_GID, D, m_ptr->SCP_SEG,
+               (cp_grant_id_t) m_ptr->SCP_GID, 
                m_ptr->SCP_BYTES, m_ptr->SCP_OFFSET,
                (vir_bytes) m_ptr->SCP_ADDRESS, CPF_READ);
 }
@@ -406,7 +404,7 @@ int do_vsafecopy(struct proc * caller, message * m_ptr)
 
                /* Do safecopy for this element. */
                if((r=safecopy(caller, granter, caller->p_endpoint,
-                       vec[i].v_gid, D, D,
+                       vec[i].v_gid,
                        vec[i].v_bytes, vec[i].v_offset,
                        vec[i].v_addr, access)) != OK) {
                        return r;
index 49983269313e654f5d6c82a0aaf742504b0b3df5..88d248094d28ce665365ea835dda641ef706e951 100644 (file)
@@ -475,7 +475,7 @@ static int msg_ioctl(const message *m_ptr)
 
                if(sys_safecopyfrom(m_ptr->m_source, 
                                        (vir_bytes)m_ptr->ADDRESS, 0,
-                                       (vir_bytes)io_ctl_buf, len, D) != OK) {
+                                       (vir_bytes)io_ctl_buf, len) != OK) {
                        printf("%s:%d: safecopyfrom failed\n", __FILE__, __LINE__);
                }
        }
@@ -488,7 +488,7 @@ static int msg_ioctl(const message *m_ptr)
                /* copy result back to user */
 
                if(sys_safecopyto(m_ptr->m_source, (vir_bytes)m_ptr->ADDRESS, 0, 
-                                       (vir_bytes)io_ctl_buf, len, D) != OK) {
+                                       (vir_bytes)io_ctl_buf, len) != OK) {
                        printf("%s:%d: safecopyto failed\n", __FILE__, __LINE__);
                }
 
@@ -794,7 +794,7 @@ static void data_from_user(sub_dev_t *subdev)
                                (vir_bytes)subdev->ReviveGrant, 0, 
                                (vir_bytes)subdev->DmaPtr + 
                                subdev->DmaFillNext * subdev->FragSize,
-                               (phys_bytes)subdev->FragSize, D);
+                               (phys_bytes)subdev->FragSize);
 
 
                subdev->DmaLength += 1;
@@ -807,7 +807,7 @@ static void data_from_user(sub_dev_t *subdev)
                                (vir_bytes)subdev->ReviveGrant, 0,
                                (vir_bytes)subdev->ExtraBuf + 
                                subdev->BufFillNext * subdev->FragSize, 
-                               (phys_bytes)subdev->FragSize, D);
+                               (phys_bytes)subdev->FragSize);
 
                subdev->BufLength += 1;
 
@@ -861,7 +861,7 @@ static void data_to_user(sub_dev_t *sub_dev_ptr)
                                (vir_bytes)sub_dev_ptr->ReviveGrant,
                                0, (vir_bytes)sub_dev_ptr->ExtraBuf + 
                                sub_dev_ptr->BufReadNext * sub_dev_ptr->FragSize,
-                               (phys_bytes)sub_dev_ptr->FragSize, D);
+                               (phys_bytes)sub_dev_ptr->FragSize);
 
                /* adjust the buffer status variables */
                sub_dev_ptr->BufReadNext = 
@@ -874,7 +874,7 @@ static void data_to_user(sub_dev_t *sub_dev_ptr)
                                (vir_bytes)sub_dev_ptr->ReviveGrant, 0, 
                                (vir_bytes)sub_dev_ptr->DmaPtr + 
                                sub_dev_ptr->DmaReadNext * sub_dev_ptr->FragSize,
-                               (phys_bytes)sub_dev_ptr->FragSize, D);
+                               (phys_bytes)sub_dev_ptr->FragSize);
 
                /* adjust the buffer status variables */
                sub_dev_ptr->DmaReadNext = 
index df32ad90014d9147cd48b6fe503bf15d30913a31..479c20dbf6e079e167e550f80d3f91078959839e 100644 (file)
@@ -230,7 +230,7 @@ static int do_vrdwt(struct blockdriver *bdp, message *mp, thread_id_t id)
   if (nr_req > NR_IOREQS) nr_req = NR_IOREQS;
 
   if (OK != sys_safecopyfrom(mp->m_source, (vir_bytes) mp->BDEV_GRANT,
-               0, (vir_bytes) iovec, nr_req * sizeof(iovec[0]), D)) {
+               0, (vir_bytes) iovec, nr_req * sizeof(iovec[0]))) {
        printf("blockdriver: bad I/O vector by: %d\n", mp->m_source);
        return EINVAL;
   }
@@ -269,7 +269,7 @@ static int do_dioctl(struct blockdriver *bdp, dev_t minor,
   case DIOCSETP:
        /* Copy just this one partition table entry. */
        r = sys_safecopyfrom(endpt, grant, 0, (vir_bytes) &entry,
-               sizeof(entry), D);
+               sizeof(entry));
        if (r != OK)
                return r;
 
@@ -295,8 +295,7 @@ static int do_dioctl(struct blockdriver *bdp, dev_t minor,
                entry.sectors = 32;
        }
 
-       r = sys_safecopyto(endpt, grant, 0, (vir_bytes) &entry, sizeof(entry),
-               D);
+       r = sys_safecopyto(endpt, grant, 0, (vir_bytes) &entry, sizeof(entry));
 
        break;
   }
index 036609c65339ee5f2562bd79c0b59908b8aaf54d..bf80cc836b93e5d6de051c6c05a088764fcaecad 100644 (file)
@@ -63,7 +63,7 @@ int trace_ctl(dev_t minor, unsigned int request, endpoint_t endpt,
 
        /* Copy in the requested size. */
        if ((r = sys_safecopyfrom(endpt, grant, 0, (vir_bytes) &size,
-               sizeof(size), D)) != OK)
+               sizeof(size))) != OK)
                return r;
 
        if (size >= INT_MAX / sizeof(btrace_entry)) return EINVAL;
@@ -103,7 +103,7 @@ int trace_ctl(dev_t minor, unsigned int request, endpoint_t endpt,
 
        /* Copy in the request code. */
        if ((r = sys_safecopyfrom(endpt, grant, 0, (vir_bytes) &ctl,
-               sizeof(ctl), D)) != OK)
+               sizeof(ctl))) != OK)
                return r;
 
        /* Start or stop tracing. */
@@ -150,7 +150,7 @@ int trace_ctl(dev_t minor, unsigned int request, endpoint_t endpt,
 
        if ((r = sys_safecopyto(endpt, grant, 0,
                (vir_bytes) &trace_buf[trace_next],
-               entries * sizeof(btrace_entry), D)) != OK)
+               entries * sizeof(btrace_entry))) != OK)
                return r;
 
        trace_next += entries;
index 2669ec04a320d3c097b057ea58b9c41c7e0fd30d..a3db9a00b6be795b82052c0bb66eeed81df3e83b 100644 (file)
@@ -280,7 +280,7 @@ static int do_vrdwt(struct chardriver *cdp, message *mp)
   iovec_size = (phys_bytes) (nr_req * sizeof(iovec[0]));
 
   if (OK != sys_safecopyfrom(mp->m_source, (vir_bytes) mp->IO_GRANT,
-               0, (vir_bytes) iovec, iovec_size, D)) {
+               0, (vir_bytes) iovec, iovec_size)) {
        printf("bad I/O vector by: %d\n", mp->m_source);
        return(EINVAL);
   }
@@ -296,7 +296,7 @@ static int do_vrdwt(struct chardriver *cdp, message *mp)
 
   /* Copy the I/O vector back to the caller. */
   if (OK != sys_safecopyto(mp->m_source, (vir_bytes) mp->IO_GRANT,
-               0, (vir_bytes) iovec, iovec_size, D)) {
+               0, (vir_bytes) iovec, iovec_size)) {
        printf("couldn't return I/O vector: %d\n", mp->m_source);
        return(EINVAL);
   }
index 67059587d9e1436c3b778310e387d24275a2bd46..1a0389b5c4c81638cee1bc7e37541f9821802e7d 100644 (file)
@@ -317,7 +317,7 @@ static void submit_urb(message *msg)
 
                /* copy in URB */
                res = sys_safecopyfrom(ep, msg->USB_GRANT_ID, 0,
-                   (vir_bytes) &mx_urb->dev_id, msg->USB_GRANT_SIZE, D);
+                   (vir_bytes) &mx_urb->dev_id, msg->USB_GRANT_SIZE);
 
                if (res != 0) {
                        DEBUG_MSG("sys_safecopyfrom failed ");
@@ -474,7 +474,7 @@ static void completion_callback(void *priv)
        /* copy out URB */
        res = sys_safecopyto(drv->ep, ctx->gid, 0,
            (vir_bytes) ((char*)mx_urb) + sizeof(void*),
-               mx_urb->urb_size - sizeof(void*), D);
+               mx_urb->urb_size - sizeof(void*));
 
        if (res != 0) {
                DEBUG_MSG("Copy out failed: %d", res);
index a1247c78c6586f736102f456dbfc600f4cf6ceee..3c5a62d424aa4c101e9743d8f35eca59ffa11630 100644 (file)
@@ -17,7 +17,7 @@ int fs_lookup_credentials(vfs_ucred_t *credentials,
 
   if(cred_size == sizeof(*credentials)) {
            r = sys_safecopyfrom(VFS_PROC_NR, grant2, (vir_bytes) 0,
-                                (vir_bytes) credentials, cred_size, D);
+                                (vir_bytes) credentials, cred_size);
            if (r != OK) {
                printf("FS: cred copy (regular) failed.\n");
                return(r);
@@ -25,7 +25,7 @@ int fs_lookup_credentials(vfs_ucred_t *credentials,
   } else if(cred_size == sizeof(old_cred)) {
            int g;
            r = sys_safecopyfrom(VFS_PROC_NR, grant2, (vir_bytes) 0,
-                                (vir_bytes) &old_cred, sizeof(old_cred), D);
+                                (vir_bytes) &old_cred, sizeof(old_cred));
            if (r != OK) {
                printf("FS: cred copy (fallback) failed.\n");
                return(r);
index e63599fcc95a185fa313ab128045e5eeca97a2db..e797f2102920d276bce48df78cb8e32208335a61 100644 (file)
@@ -90,7 +90,7 @@ int fs_link()
         return(ENAMETOOLONG);
 
   r = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT, 0,
-                       (vir_bytes) string, (size_t) len, D);
+                       (vir_bytes) string, (size_t) len);
   if (r != OK) return(r);
   NUL(string, len, sizeof(string));
 
@@ -182,7 +182,7 @@ int fs_rdlink()
   }
 
   r = sys_safecopyto(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT,
-                 (vir_bytes) 0, (vir_bytes) path, (size_t) copylen, D);
+                 (vir_bytes) 0, (vir_bytes) path, (size_t) copylen);
   if (r == OK)
          fs_m_out.RES_NBYTES = copylen;
 
@@ -219,7 +219,7 @@ int fs_rename()
         return(ENAMETOOLONG);
 
   r = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_REN_GRANT_OLD,
-                (vir_bytes) 0, (vir_bytes) pcn_src.pcn_name, (size_t) len, D);
+                (vir_bytes) 0, (vir_bytes) pcn_src.pcn_name, (size_t) len);
   if (r != OK) return(r);
   NUL(pcn_src.pcn_name, len, sizeof(pcn_src.pcn_name));
   pcn_src.pcn_namelen = len - 1;
@@ -230,7 +230,7 @@ int fs_rename()
         return(ENAMETOOLONG);
 
   r = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_REN_GRANT_NEW,
-                (vir_bytes) 0, (vir_bytes) pcn_targ.pcn_name, (size_t) len, D);
+                (vir_bytes) 0, (vir_bytes) pcn_targ.pcn_name, (size_t) len);
   if (r != OK) return(r);
   NUL(pcn_targ.pcn_name, len, sizeof(pcn_targ.pcn_name));
   pcn_targ.pcn_namelen = len - 1;
@@ -415,7 +415,7 @@ int fs_unlink()
 
   r = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT,
                       (vir_bytes) 0, (vir_bytes) pcn.pcn_name,
-                      (size_t) len, D);
+                      (size_t) len);
   if (r != OK) return (r);
   NUL(pcn.pcn_name, len, sizeof(pcn.pcn_name));
 
index c9a64bcca36a0c106453adbd30b0dea0162573cd..d520ac9732f5aa9a5cf2cd6e0349e0eba9fe0beb 100644 (file)
@@ -48,7 +48,7 @@ int fs_create()
 
   err_code = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT,
                              (vir_bytes) 0, (vir_bytes) pcn.pcn_name,
-                             (size_t) len, D);
+                             (size_t) len);
   if (err_code != OK) return(err_code);
   NUL(pcn.pcn_name, len, sizeof(pcn.pcn_name));
 
@@ -140,7 +140,7 @@ int fs_mknod()
 
   err_code = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT,
                              (vir_bytes) 0, (vir_bytes) pcn.pcn_name,
-                            (size_t) len, D);
+                            (size_t) len);
   if (err_code != OK) return(err_code);
   NUL(pcn.pcn_name, len, sizeof(pcn.pcn_name));
 
@@ -223,7 +223,7 @@ int fs_mkdir()
 
   err_code = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT,
                              (vir_bytes) 0, (vir_bytes) pcn.pcn_name,
-                             (phys_bytes) len, D);
+                             (phys_bytes) len);
   if (err_code != OK) return(err_code);
   NUL(pcn.pcn_name, len, sizeof(pcn.pcn_name));
 
@@ -307,14 +307,14 @@ int fs_slink()
 
   r = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT,
                       (vir_bytes) 0, (vir_bytes) pcn.pcn_name,
-                      (size_t) len, D);
+                      (size_t) len);
   if (r != OK) return(r);
   NUL(pcn.pcn_name, len, sizeof(pcn.pcn_name));
 
   /* Copy the target path (note that it's not null terminated) */
   r = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT3,
                       (vir_bytes) 0, (vir_bytes) target, 
-                      (size_t) fs_m_in.REQ_MEM_SIZE, D);
+                      (size_t) fs_m_in.REQ_MEM_SIZE);
   if (r != OK) return(r);
   target[fs_m_in.REQ_MEM_SIZE] = '\0';
 
index e4a2fd8551d7b41ad9573a08da38d37fc2bd3f55..bac1a1d040b95f6e89276c9390242e24ea5c0124 100644 (file)
@@ -57,7 +57,7 @@ int fs_lookup()
 
   /* Copy the pathname and set up caller's user and group id */
   r = sys_safecopyfrom(VFS_PROC_NR, grant, /*offset*/ 0,
-            (vir_bytes) user_path, (size_t) len, D);
+            (vir_bytes) user_path, (size_t) len);
   if (r != OK) return(r);
 
   /* Verify this is a null-terminated path. */
@@ -85,7 +85,7 @@ int fs_lookup()
        if (len > path_size) return(ENAMETOOLONG);
 
        r1 = sys_safecopyto(VFS_PROC_NR, grant, (vir_bytes) 0,
-                           (vir_bytes) user_path, (size_t) len, D);
+                           (vir_bytes) user_path, (size_t) len);
        if (r1 != OK) return(r1);
   }
 
index 6f39e3d2ef4394ce869bca0dbd4b17e71678339f..10d83f5f03cf61b64a7e03779209bb085c18c929 100644 (file)
@@ -67,7 +67,7 @@ int fs_readwrite(void)
        bytes_done = nrbytes - bytes_left;
        if (bytes_done) {
                r = sys_safecopyto(VFS_PROC_NR, gid, (vir_bytes) 0,
-                                  (vir_bytes) rw_buf, bytes_done, D);
+                                  (vir_bytes) rw_buf, bytes_done);
                update_times(pn, ATIME, 0);
        }
   } else if (rw_flag == WRITING) {
@@ -85,7 +85,7 @@ int fs_readwrite(void)
        if (r) return(EINVAL);
 
        r = sys_safecopyfrom(VFS_PROC_NR, gid, (vir_bytes) 0,
-                            (vir_bytes) rw_buf, nrbytes, D);
+                            (vir_bytes) rw_buf, nrbytes);
        if (r != OK) return(EINVAL);
 
        if (global_pu->pu_ops.puffs_node_write == NULL)
@@ -165,7 +165,7 @@ int fs_getdents(void)
 
   if (written) {
        r = sys_safecopyto(VFS_PROC_NR, gid, (vir_bytes) 0,
-                            (vir_bytes) getdents_buf, written, D);
+                            (vir_bytes) getdents_buf, written);
        if (r != OK) return(r);
   }
 
index 2dbd4ce08f4c58d4d8131c741d588d9874f8fb78..ddf9acf9b0bf3171b786d27ac8d2a33f1d6c9cb8 100644 (file)
@@ -30,7 +30,7 @@ int fs_fstatfs()
 
   /* Copy the struct to user space. */
   r = sys_safecopyto(fs_m_in.m_source, (cp_grant_id_t) fs_m_in.REQ_GRANT,
-                    (vir_bytes) 0, (vir_bytes) &st, (size_t) sizeof(st), D);
+                    (vir_bytes) 0, (vir_bytes) &st, (size_t) sizeof(st));
 
   return(r);
 }
@@ -88,7 +88,7 @@ int fs_stat()
   /* Copy the struct to user space. */
   r = sys_safecopyto(fs_m_in.m_source, (cp_grant_id_t) fs_m_in.REQ_GRANT,
                     (vir_bytes) 0, (vir_bytes) &statbuf,
-                    (size_t) sizeof(statbuf), D);
+                    (size_t) sizeof(statbuf));
 
   return(r);
 }
@@ -115,7 +115,7 @@ int fs_statvfs()
 
   /* Copy the struct to user space. */
   r = sys_safecopyto(fs_m_in.m_source, fs_m_in.REQ_GRANT, 0, (vir_bytes) &st,
-                    (phys_bytes) sizeof(st), D);
+                    (phys_bytes) sizeof(st));
 
   return(r);
 }
index e964f27301fae34bd31c2df0b7dffd9fba0ee082..b94b6a0fd837b1f86b84ba181e78775fa257e670 100644 (file)
@@ -215,7 +215,7 @@ int do_lookup()
        return EINVAL;
 
   r = sys_safecopyfrom(m_in.m_source, m_in.REQ_GRANT, 0,
-       (vir_bytes) buf, len, D);
+       (vir_bytes) buf, len);
 
   if (r != OK)
        return r;
@@ -237,7 +237,7 @@ int do_lookup()
        }
 
        r = sys_safecopyfrom(m_in.m_source, m_in.REQ_GRANT2, 0,
-               (vir_bytes) &ucred, m_in.REQ_UCRED_SIZE, D);
+               (vir_bytes) &ucred, m_in.REQ_UCRED_SIZE);
 
        if (r != OK)
                return r;
index 54e203b3b168256d4df4e22849508a1f27886194..fe48d84cf0edc3e7097d2a44e06891f21aacf80e 100644 (file)
@@ -25,7 +25,7 @@ int do_fstatfs()
   statfs.f_bsize = BLOCK_SIZE; /* arbitrary block size constant */
 
   return sys_safecopyto(m_in.m_source, m_in.REQ_GRANT, 0,
-       (vir_bytes) &statfs, sizeof(statfs), D);
+       (vir_bytes) &statfs, sizeof(statfs));
 }
 
 /*===========================================================================*
@@ -74,5 +74,5 @@ int do_statvfs()
   statvfs.f_namemax = NAME_MAX;
 
   return sys_safecopyto(m_in.m_source, m_in.REQ_GRANT, 0,
-       (vir_bytes) &statvfs, sizeof(statvfs), D);
+       (vir_bytes) &statvfs, sizeof(statvfs));
 }
index a8ddf08128aa23dd111c22f77b12f229f09e150a..e34bd28d2ee0261cfc903d1fea7e8f4d85cd2505 100644 (file)
@@ -54,7 +54,7 @@ int do_read()
        chunk = r;
 
        r = sys_safecopyto(m_in.m_source, m_in.REQ_GRANT, off,
-               (vir_bytes) ptr, chunk, D);
+               (vir_bytes) ptr, chunk);
 
        if (r != OK)
                break;
@@ -190,7 +190,7 @@ int do_getdents()
        /* If our own buffer cannot contain the new record, copy out first. */
        if (off + len > sizeof(buf)) {
                r = sys_safecopyto(m_in.m_source, m_in.REQ_GRANT,
-                       user_off, (vir_bytes) buf, off, D);
+                       user_off, (vir_bytes) buf, off);
 
                if (r != OK) {
                        put_inode(child);
@@ -218,7 +218,7 @@ int do_getdents()
   /* If there is anything left in our own buffer, copy that out now. */
   if (off > 0) {
        r = sys_safecopyto(m_in.m_source, m_in.REQ_GRANT, user_off,
-               (vir_bytes) buf, off, D);
+               (vir_bytes) buf, off);
 
        if (r != OK)
                return r;
index a3351d71e559b5b6106fd04e085b5961ae8031a8..dbac8086743306b434881f88ea3d75098b5b13c6 100644 (file)
@@ -97,7 +97,7 @@ int do_stat()
   }
 
   return sys_safecopyto(m_in.m_source, m_in.REQ_GRANT, 0,
-       (vir_bytes) &stat, sizeof(stat), D);
+       (vir_bytes) &stat, sizeof(stat));
 }
 
 /*===========================================================================*
index 3664dbc36de9f9ada5486508f688fd806d231499..6537416914d7830118c060ef226fc2b1211486b6 100644 (file)
@@ -27,7 +27,7 @@ char name[NAME_MAX+1];                /* buffer in which store the result */
   if (len <= 1) return EINVAL;
   if (len > NAME_MAX+1) return ENAMETOOLONG;
 
-  r = sys_safecopyfrom(m_in.m_source, grant, 0, (vir_bytes) name, len, D);
+  r = sys_safecopyfrom(m_in.m_source, grant, 0, (vir_bytes) name, len);
 
   if (r != OK) return r;
 
index 91000d1fee405f19568ba4043738616d198a1880..bf70038a72f2ce0c4eb9580ade6c36b907732f64 100644 (file)
@@ -50,7 +50,7 @@ cp_grant_id_t *grantp;
 
        if (grantp != NULL) {
                r = sys_safecopyfrom(m_in.m_source, *grantp,
-                       off, (vir_bytes) ptr, chunk, D);
+                       off, (vir_bytes) ptr, chunk);
 
                if (r != OK)
                        break;
index ab5eb8cc4678752ed2f1e47880db2e24c4bf56d5..bb9b4a8d526e84503a12435f10d7a56236719445 100644 (file)
@@ -31,7 +31,7 @@ static void add_buff(void *ptr, int size)
                size = pos - gcov_buff_sz;
        }
 
-       r = sys_safecopyto(VFS_PROC_NR, grant, pos, (vir_bytes)ptr, size, D);
+       r = sys_safecopyto(VFS_PROC_NR, grant, pos, (vir_bytes)ptr, size);
 
        if(r) {
                printf("libsys: gcov: safecopy failed (%d)\n", r);
index 0f569f51845dd39a8a26a084c0a5ef5039ea8727..bc2b6f78173437fbd7843a227b8017c2eb5e83af 100644 (file)
@@ -5,8 +5,7 @@
 
 int sys_safecopyfrom(endpoint_t src_e,
        cp_grant_id_t gr_id, vir_bytes offset,
-       vir_bytes address, size_t bytes,
-       int my_seg)
+       vir_bytes address, size_t bytes)
 {
 /* Transfer a block of data for which the other process has previously
  * given permission. 
@@ -15,20 +14,23 @@ int sys_safecopyfrom(endpoint_t src_e,
   message copy_mess;
 
   copy_mess.SCP_FROM_TO = src_e;
-  copy_mess.SCP_SEG = my_seg;
   copy_mess.SCP_GID = gr_id;
   copy_mess.SCP_OFFSET = (long) offset;
   copy_mess.SCP_ADDRESS = (char *) address;
   copy_mess.SCP_BYTES = (long) bytes;
 
+  /* for older kernels that still need the 'seg' field
+   * provide the right value.
+   */
+  copy_mess.SCP_SEG_OBSOLETE = D;
+
   return(_kernel_call(SYS_SAFECOPYFROM, &copy_mess));
 
 }
 
 int sys_safecopyto(endpoint_t dst_e,
        cp_grant_id_t gr_id, vir_bytes offset,
-       vir_bytes address, size_t bytes,
-       int my_seg)
+       vir_bytes address, size_t bytes)
 {
 /* Transfer a block of data for which the other process has previously
  * given permission. 
@@ -37,12 +39,16 @@ int sys_safecopyto(endpoint_t dst_e,
   message copy_mess;
 
   copy_mess.SCP_FROM_TO = dst_e;
-  copy_mess.SCP_SEG = my_seg;
   copy_mess.SCP_GID = gr_id;
   copy_mess.SCP_OFFSET = (long) offset;
   copy_mess.SCP_ADDRESS = (char *) address;
   copy_mess.SCP_BYTES = (long) bytes;
 
+  /* for older kernels that still need the 'seg' field
+   * provide the right value.
+   */
+  copy_mess.SCP_SEG_OBSOLETE = D;
+
   return(_kernel_call(SYS_SAFECOPYTO, &copy_mess));
 
 }
index 39aa2ed3ef2b397afb68d587d98367d2278bfb74..5835eb0f980f7c156a1b98c9b406ba17bf2bfb43 100644 (file)
@@ -33,7 +33,7 @@ int fs_rdlink(void)
 
        /* Copy out the result. */
        r = sys_safecopyto(fs_m_in.m_source, fs_m_in.REQ_GRANT, 0,
-               (vir_bytes) path, len, D);
+               (vir_bytes) path, len);
        if (r != OK) return r;
 
        fs_m_out.RES_NBYTES = len;
index ef8f3a2723c908f747d53e911ba17a3288b7ae4a..f2db11792ac94c55df36744879c34b7737ad09ed 100644 (file)
@@ -166,7 +166,7 @@ int fs_lookup(void)
                return EINVAL;
 
        r = sys_safecopyfrom(fs_m_in.m_source, fs_m_in.REQ_GRANT, 0,
-               (vir_bytes) path, (phys_bytes) len, D);
+               (vir_bytes) path, (phys_bytes) len);
        if (r != OK) return r;
 
        if (path[len-1] != 0) return EINVAL;
@@ -176,7 +176,7 @@ int fs_lookup(void)
                assert(fs_m_in.REQ_UCRED_SIZE == sizeof(ucred));
 
                r = sys_safecopyfrom(fs_m_in.m_source, fs_m_in.REQ_GRANT2, 0,
-                       (vir_bytes) &ucred, fs_m_in.REQ_UCRED_SIZE, D);
+                       (vir_bytes) &ucred, fs_m_in.REQ_UCRED_SIZE);
 
                if (r != OK)
                        return r;
@@ -286,7 +286,7 @@ int fs_lookup(void)
                if (symloop > 0 && (r == ELEAVEMOUNT || r == ESYMLINK)) {
                        r2 = sys_safecopyto(fs_m_in.m_source,
                                fs_m_in.REQ_GRANT, 0, (vir_bytes) path,
-                               strlen(path) + 1, D);
+                               strlen(path) + 1);
 
                        if (r2 != OK)
                                r = r2;
index 5e264d83ddc612d1d69b7db2dfdce46492efc68f..86512885dcc88cfc676c19f950af8c389803e207 100644 (file)
@@ -50,7 +50,7 @@ int fs_read(void)
                /* Copy the resulting data to user space. */
                if (r == OK && len > 0) {
                        r = sys_safecopyto(fs_m_in.m_source, fs_m_in.REQ_GRANT,
-                               0, (vir_bytes) ptr, len, D);
+                               0, (vir_bytes) ptr, len);
                }
        } else {
                /* Feign an empty file. */
@@ -179,7 +179,7 @@ int fs_getdents(void)
                 */
                if (off + len > sizeof(buf)) {
                        r = sys_safecopyto(fs_m_in.m_source, fs_m_in.REQ_GRANT,
-                               user_off, (vir_bytes) buf, off, D);
+                               user_off, (vir_bytes) buf, off);
                        if (r != OK) return r;
 
                        user_off += off;
@@ -200,7 +200,7 @@ int fs_getdents(void)
        /* If there is anything left in our own buffer, copy that out now. */
        if (off > 0) {
                r = sys_safecopyto(fs_m_in.m_source, fs_m_in.REQ_GRANT,
-                       user_off, (vir_bytes) buf, off, D);
+                       user_off, (vir_bytes) buf, off);
                if (r != OK)
                        return r;
 
index 2317ff8ca4de471055d4bb147f0614019e9e17d1..c2f9a1e50b4ce5f30e5adf5ebfa624e9f5b3e607 100644 (file)
@@ -52,7 +52,7 @@ int fs_stat(void)
 
        /* Copy the struct to user space. */
        return sys_safecopyto(fs_m_in.m_source, fs_m_in.REQ_GRANT, 0,
-               (vir_bytes) &statbuf, (phys_bytes) sizeof(statbuf), D);
+               (vir_bytes) &statbuf, (phys_bytes) sizeof(statbuf));
 }
 
 /*===========================================================================*
@@ -68,7 +68,7 @@ int fs_fstatfs(void)
 
        /* Copy the struct to user space. */
        return sys_safecopyto(fs_m_in.m_source, fs_m_in.REQ_GRANT, 0,
-               (vir_bytes) &statfs, (phys_bytes) sizeof(statfs), D);
+               (vir_bytes) &statfs, (phys_bytes) sizeof(statfs));
 }
 
 /*===========================================================================*
@@ -87,5 +87,5 @@ int fs_statvfs(void)
        statvfs.f_namemax = PNAME_MAX;
 
        return sys_safecopyto(fs_m_in.m_source, fs_m_in.REQ_GRANT, 0,
-               (vir_bytes) &statvfs, sizeof(statvfs), D);
+               (vir_bytes) &statvfs, sizeof(statvfs));
 }
index 596d2c812faafd8c51d3d34c8337969f214b17f6..6f9b525eeb7d2db26212338aa8cd3e4be0043b72 100644 (file)
@@ -244,7 +244,7 @@ int do_add_device(message *msg)
        }
        
        res = sys_safecopyfrom(ep, msg->DEVMAN_GRANT_ID,
-                 0, (vir_bytes) devinf, msg->DEVMAN_GRANT_SIZE, D);
+                 0, (vir_bytes) devinf, msg->DEVMAN_GRANT_SIZE);
 
        if (res != OK) {
                res = EINVAL;
index 79c58c7f5286cfe763d79efeba627a88da449ec1..6e2de1974986977d39d25c7d32e87b2edb512709 100644 (file)
@@ -155,7 +155,7 @@ static int get_key_name(const message *m_ptr, char *key_name)
   /* Copy name from caller. */
   r = sys_safecopyfrom(m_ptr->m_source,
        (cp_grant_id_t) m_ptr->DS_KEY_GRANT, 0, 
-       (vir_bytes) key_name, m_ptr->DS_KEY_LEN, D);
+       (vir_bytes) key_name, m_ptr->DS_KEY_LEN);
   if(r != OK) {
        printf("DS: publish: copy failed from %d: %d\n", m_ptr->m_source, r);
        return r;
@@ -268,7 +268,7 @@ int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *info)
 
        /* Map all the services in the boot image. */
        if((r = sys_safecopyfrom(RS_PROC_NR, info->rproctab_gid, 0,
-               (vir_bytes) rprocpub, sizeof(rprocpub), S)) != OK) {
+               (vir_bytes) rprocpub, sizeof(rprocpub))) != OK) {
                panic("sys_safecopyfrom failed: %d", r);
        }
        for(i=0;i < NR_BOOT_PROCS;i++) {
@@ -353,7 +353,7 @@ int do_publish(message *m_ptr)
 
        /* Copy the memory range. */
        r = sys_safecopyfrom(m_ptr->m_source, (cp_grant_id_t) m_ptr->DS_VAL,
-               0, (vir_bytes) dsp->u.mem.data, length, D);
+               0, (vir_bytes) dsp->u.mem.data, length);
        if(r != OK) {
                printf("DS: publish: memory map/copy failed from %d: %d\n",
                        m_ptr->m_source, r);
@@ -432,7 +432,7 @@ int do_retrieve(message *m_ptr)
   case DSF_TYPE_MEM:
        length = MIN(m_ptr->DS_VAL_LEN, dsp->u.mem.length);
        r = sys_safecopyto(m_ptr->m_source, (cp_grant_id_t) m_ptr->DS_VAL, 0,
-               (vir_bytes) dsp->u.mem.data, length, D);
+               (vir_bytes) dsp->u.mem.data, length);
        if(r != OK) {
                printf("DS: retrieve: copy failed to %d: %d\n", 
                        m_ptr->m_source, r);
@@ -471,7 +471,7 @@ int do_retrieve(message *m_ptr)
                length = MIN(m_ptr->DS_VAL_LEN, dsp->u.map.length);
                r = sys_safecopyto(m_ptr->m_source,
                        (cp_grant_id_t) m_ptr->DS_VAL, (vir_bytes) 0,
-                       (vir_bytes) data, length, D);
+                       (vir_bytes) data, length);
                if(r != OK) {
                        printf("DS: retrieve: copy failed to %d: %d\n", 
                                m_ptr->m_source, r);
@@ -505,7 +505,7 @@ int do_retrieve_label(const message *m_ptr)
   /* Copy the key name. */
   r = sys_safecopyto(m_ptr->m_source,
        (cp_grant_id_t) m_ptr->DS_KEY_GRANT, (vir_bytes) 0,
-       (vir_bytes) dsp->key, strlen(dsp->key) + 1, D);
+       (vir_bytes) dsp->key, strlen(dsp->key) + 1);
   if(r != OK) {
        printf("DS: copy failed from %d: %d\n", m_ptr->m_source, r);
        return r;
@@ -620,7 +620,7 @@ int do_check(message *m_ptr)
   /* Copy the key name. */
   r = sys_safecopyto(m_ptr->m_source,
        (cp_grant_id_t) m_ptr->DS_KEY_GRANT, (vir_bytes) 0, 
-       (vir_bytes) ds_store[i].key, strlen(ds_store[i].key) + 1, D);
+       (vir_bytes) ds_store[i].key, strlen(ds_store[i].key) + 1);
   if(r != OK) {
        printf("DS: check: copy failed from %d: %d\n", m_ptr->m_source, r);
        return r;
index 9f741aa1d67ade7bc81d9357488f0026f1e0dce1..b593306b0b74c599d9aefc779e60b2747bf16526 100644 (file)
@@ -46,7 +46,7 @@ int fs_link()
        return(ENAMETOOLONG);
 
   r = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT, 0,
-                      (vir_bytes) string, (size_t) len, D);
+                      (vir_bytes) string, (size_t) len);
   if (r != OK) return r;
   NUL(string, len, sizeof(string));
 
@@ -134,7 +134,7 @@ int fs_unlink()
        return(ENAMETOOLONG);
 
   r = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT,
-                       (vir_bytes) 0, (vir_bytes) string, (size_t) len, D);
+                       (vir_bytes) 0, (vir_bytes) string, (size_t) len);
   if (r != OK) return r;
   NUL(string, len, sizeof(string));
 
@@ -218,7 +218,7 @@ int fs_rdlink()
        copylen = min( copylen, (unsigned) rip->i_size);
        r = sys_safecopyto(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT,
                           (vir_bytes) 0, (vir_bytes) link_text,
-                          (size_t) copylen, D);
+                          (size_t) copylen);
        put_block(bp, DIRECTORY_BLOCK);
        if (r == OK)
                fs_m_out.RES_NBYTES = copylen;
@@ -323,7 +323,7 @@ int fs_rename()
        return(ENAMETOOLONG);
 
   r = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_REN_GRANT_OLD,
-                      (vir_bytes) 0, (vir_bytes) old_name, (size_t) len, D);
+                      (vir_bytes) 0, (vir_bytes) old_name, (size_t) len);
   if (r != OK) return r;
   NUL(old_name, len, sizeof(old_name));
 
@@ -333,7 +333,7 @@ int fs_rename()
        return(ENAMETOOLONG);
 
   r = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_REN_GRANT_NEW,
-                       (vir_bytes) 0, (vir_bytes) new_name, (size_t) len, D);
+                       (vir_bytes) 0, (vir_bytes) new_name, (size_t) len);
   if (r != OK) return r;
   NUL(new_name, len, sizeof(new_name));
 
index be3dc0e37de671f5465256edbff9a1497dea7cb3..ffc6341f71610c0513b9e34358b3f1a53b126cda 100644 (file)
@@ -84,7 +84,7 @@ int fs_new_driver(void)
        return(EINVAL);
 
   r = sys_safecopyfrom(fs_m_in.m_source, label_gid, (vir_bytes) 0,
-       (vir_bytes) label, label_len, D);
+       (vir_bytes) label, label_len);
 
   if (r != OK) {
        printf("ext2: fs_new_driver safecopyfrom failed (%d)\n", r);
index 2952d33f6d89ea2e39469ea3215e664e74ad017d..e5daa22c2481b0ec8b53a1b6ac7654047af41332 100644 (file)
@@ -43,7 +43,7 @@ int fs_readsuper()
        return(EINVAL);
 
   r = sys_safecopyfrom(fs_m_in.m_source, label_gid, 0,
-                      (vir_bytes)fs_dev_label, label_len, D);
+                      (vir_bytes)fs_dev_label, label_len);
   if (r != OK) {
        printf("%s:%d fs_readsuper: safecopyfrom failed: %d\n",
               __FILE__, __LINE__, r);
index 8c873973d3fdc7a65382058742d1de5bb3da5b1f..fc65e7595dde4499ad27bcefbe49d3b327696e50 100644 (file)
@@ -40,7 +40,7 @@ int fs_create()
        return(ENAMETOOLONG);
 
   err_code = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT,
-                             (vir_bytes) 0, (vir_bytes) lastc, (size_t) len, D);
+                             (vir_bytes) 0, (vir_bytes) lastc, (size_t) len);
   if (err_code != OK) return err_code;
   NUL(lastc, len, sizeof(lastc));
 
@@ -90,7 +90,7 @@ int fs_mknod()
        return(ENAMETOOLONG);
 
   err_code = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT,
-                             (vir_bytes) 0, (vir_bytes) lastc, (size_t) len, D);
+                             (vir_bytes) 0, (vir_bytes) lastc, (size_t) len);
   if (err_code != OK) return err_code;
   NUL(lastc, len, sizeof(lastc));
 
@@ -128,7 +128,7 @@ int fs_mkdir()
        return(ENAMETOOLONG);
 
   err_code = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT,
-                             (vir_bytes) 0, (vir_bytes) lastc, (phys_bytes) len, D);
+                             (vir_bytes) 0, (vir_bytes) lastc, (phys_bytes) len);
   if(err_code != OK) return(err_code);
   NUL(lastc, len, sizeof(lastc));
 
@@ -203,7 +203,7 @@ int fs_slink()
        return(ENAMETOOLONG);
 
   r = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT,
-                      (vir_bytes) 0, (vir_bytes) string, (size_t) len, D);
+                      (vir_bytes) 0, (vir_bytes) string, (size_t) len);
   if (r != OK) return(r);
   NUL(string, len, sizeof(string));
 
@@ -225,7 +225,7 @@ int fs_slink()
                r = sys_safecopyfrom(VFS_PROC_NR,
                                     (cp_grant_id_t) fs_m_in.REQ_GRANT3,
                                     (vir_bytes) 0, (vir_bytes) sip->i_block,
-                                     (vir_bytes) fs_m_in.REQ_MEM_SIZE, D);
+                                     (vir_bytes) fs_m_in.REQ_MEM_SIZE);
                sip->i_dirt = DIRTY;
                link_target_buf = (char*) sip->i_block;
         } else {
@@ -233,7 +233,7 @@ int fs_slink()
                        sys_safecopyfrom(VFS_PROC_NR,
                                         (cp_grant_id_t) fs_m_in.REQ_GRANT3,
                                         (vir_bytes) 0, (vir_bytes) bp->b_data,
-                                        (vir_bytes) fs_m_in.REQ_MEM_SIZE, D);
+                                        (vir_bytes) fs_m_in.REQ_MEM_SIZE);
                        bp->b_dirt = DIRTY;
                        link_target_buf = bp->b_data;
                } else {
index 5c8b167a830a88218f4fb7a05a39dd5fe23dbfb8..5b063e2477b4de6f89c88a16755f2869ab4b7beb 100644 (file)
@@ -56,7 +56,7 @@ int fs_lookup()
 
   /* Copy the pathname and set up caller's user and group id */
   r = sys_safecopyfrom(VFS_PROC_NR, grant, /*offset*/ 0,
-            (vir_bytes) user_path, (size_t) len, D);
+            (vir_bytes) user_path, (size_t) len);
   if(r != OK) return(r);
 
   /* Verify this is a null-terminated path. */
@@ -83,7 +83,7 @@ int fs_lookup()
        if(len > path_size) return(ENAMETOOLONG);
 
        r1 = sys_safecopyto(VFS_PROC_NR, grant, (vir_bytes) 0,
-                           (vir_bytes) user_path, (size_t) len, D);
+                           (vir_bytes) user_path, (size_t) len);
        if (r1 != OK) return(r1);
   }
 
index 337f87fb5c650f4bd42f19d0781c99d58e58e422..587239008ffcaf2b4aca115b97fe627b48d81785 100644 (file)
@@ -272,11 +272,11 @@ int *completed;                 /* number of bytes copied */
   if (rw_flag == READING) {
        /* Copy a chunk from the block buffer to user space. */
        r = sys_safecopyto(VFS_PROC_NR, gid, (vir_bytes) buf_off,
-                          (vir_bytes) (bp->b_data+off), (size_t) chunk, D);
+                          (vir_bytes) (bp->b_data+off), (size_t) chunk);
   } else {
        /* Copy a chunk from user space to the block buffer. */
        r = sys_safecopyfrom(VFS_PROC_NR, gid, (vir_bytes) buf_off,
-                            (vir_bytes) (bp->b_data+off), (size_t) chunk, D);
+                            (vir_bytes) (bp->b_data+off), (size_t) chunk);
        bp->b_dirt = DIRTY;
   }
 
@@ -624,7 +624,7 @@ int fs_getdents(void)
                r = sys_safecopyto(VFS_PROC_NR, gid,
                                   (vir_bytes) userbuf_off,
                                   (vir_bytes) getdents_buf,
-                                  (size_t) tmpbuf_off, D);
+                                  (size_t) tmpbuf_off);
                if (r != OK) {
                        put_inode(rip);
                        return(r);
@@ -661,7 +661,7 @@ int fs_getdents(void)
 
   if (tmpbuf_off != 0) {
        r = sys_safecopyto(VFS_PROC_NR, gid, (vir_bytes) userbuf_off,
-                          (vir_bytes) getdents_buf, (size_t) tmpbuf_off, D);
+                          (vir_bytes) getdents_buf, (size_t) tmpbuf_off);
        if (r != OK) {
                put_inode(rip);
                return(r);
index 85f727b144d487ca2ce3ec4a3938cd5eb692d8b0..135e066287b8ed40996baab9d1a5c362b46eb427 100644 (file)
@@ -54,7 +54,7 @@ static int stat_inode(
 
   /* Copy the struct to user space. */
   r = sys_safecopyto(who_e, gid, (vir_bytes) 0, (vir_bytes) &statbuf,
-                    (size_t) sizeof(statbuf), D);
+                    (size_t) sizeof(statbuf));
 
   return(r);
 }
@@ -76,7 +76,7 @@ int fs_fstatfs()
 
   /* Copy the struct to user space. */
   r = sys_safecopyto(fs_m_in.m_source, (cp_grant_id_t) fs_m_in.REQ_GRANT,
-                    (vir_bytes) 0, (vir_bytes) &st, (size_t) sizeof(st), D);
+                    (vir_bytes) 0, (vir_bytes) &st, (size_t) sizeof(st));
 
   return(r);
 }
@@ -124,7 +124,7 @@ int fs_statvfs()
 
   /* Copy the struct to user space. */
   r = sys_safecopyto(fs_m_in.m_source, fs_m_in.REQ_GRANT, 0, (vir_bytes) &st,
-                    (phys_bytes) sizeof(st), D);
+                    (phys_bytes) sizeof(st));
 
   return(r);
 }
index 2b16845bfeb4c8fc1e86f5392bfaf1e7fcc3fa40..e6c6178d8806852409d4981912dbc840c20c05cb 100644 (file)
@@ -897,7 +897,7 @@ int size;
                {
                        r= sys_safecopyfrom(s_cp_req[0].v_from,
                                s_cp_req[0].v_gid, s_cp_req[0].v_offset,
-                               s_cp_req[0].v_addr, s_cp_req[0].v_bytes, D);
+                               s_cp_req[0].v_addr, s_cp_req[0].v_bytes);
                        if (r <0)
                        {
                                printf("sys_safecopyfrom failed: %d\n", r);
@@ -961,7 +961,7 @@ vir_bytes offset;
                {
                        r= sys_safecopyto(s_cp_req[0].v_to,
                                s_cp_req[0].v_gid, s_cp_req[0].v_offset,
-                               s_cp_req[0].v_addr, s_cp_req[0].v_bytes, D);
+                               s_cp_req[0].v_addr, s_cp_req[0].v_bytes);
                        if (r <0)
                        {
                                printf("sys_safecopyto failed: %d\n", r);
index dffef64c0a333f3100e162a5da0f616e6287ff69..7c7c9eb914a1f7e5d260e730d2dc5e84160db0f6 100644 (file)
@@ -34,7 +34,7 @@ int fs_new_driver(void)
        return(EINVAL);
 
   r = sys_safecopyfrom(fs_m_in.m_source, label_gid, (vir_bytes) 0,
-       (vir_bytes) label, label_len, D);
+       (vir_bytes) label, label_len);
 
   if (r != OK) {
        printf("ISOFS: fs_new_driver safecopyfrom failed (%d)\n", r);
index 911a9cc98d7c0e18271bd736e61d30d5f5287cac..f1db6db75e40d68101f2fd878676fab4b9205402 100644 (file)
@@ -24,7 +24,7 @@ int fs_readsuper() {
        return(EINVAL);
 
   r = sys_safecopyfrom(fs_m_in.m_source, label_gid, 0, (vir_bytes)fs_dev_label,
-                      label_len, D);
+                      label_len);
   if (r != OK) {
        printf("ISOFS %s:%d safecopyfrom failed: %d\n", __FILE__, __LINE__, r);
        return(EINVAL);
index 71df671f32073d85753b48978675d52af7c7b3fe..cd4c4c0b9442982cc8d994c292d2a0b7119d3562 100644 (file)
@@ -34,7 +34,7 @@ int fs_lookup() {
 
   /* Copy the pathname and set up caller's user and group id */
   r = sys_safecopyfrom(VFS_PROC_NR, grant, 0, (vir_bytes) user_path, 
-                      (phys_bytes) len, D);
+                      (phys_bytes) len);
   if (r != OK) {
        printf("ISOFS %s:%d sys_safecopyfrom failed: %d\n",
                __FILE__, __LINE__, r);
index 4d49cef9c371948e08bc46c16bcceea095b255c8..c0bf7fe6fc4144cc3b0f5b85efa94f82beb8f8ad 100644 (file)
@@ -228,7 +228,7 @@ int fs_getdents(void) {
                         * and start from the beginning. */
                        if (tmpbuf_offset + reclen > GETDENTS_BUFSIZ) {
                                r = sys_safecopyto(VFS_PROC_NR, gid, userbuf_off, 
-                                   (vir_bytes)getdents_buf, tmpbuf_offset, D);
+                                   (vir_bytes)getdents_buf, tmpbuf_offset);
 
                                if (r != OK)
                                        panic("fs_getdents: sys_safecopyto failed: %d", r);
@@ -262,7 +262,7 @@ int fs_getdents(void) {
 
   if (tmpbuf_offset != 0) {
        r = sys_safecopyto(VFS_PROC_NR, gid, userbuf_off,
-                          (vir_bytes) getdents_buf, tmpbuf_offset, D);
+                          (vir_bytes) getdents_buf, tmpbuf_offset);
        if (r != OK)
                panic("fs_getdents: sys_safecopyto failed: %d", r);
  
@@ -326,7 +326,7 @@ int *completed;                     /* number of bytes copied */
   }
   
   r = sys_safecopyto(VFS_PROC_NR, gid, buf_off,
-                    (vir_bytes) (bp->b_data+off), (phys_bytes) chunk, D);
+                    (vir_bytes) (bp->b_data+off), (phys_bytes) chunk);
 
   put_block(bp);
 
index eb933ea26917988cbd2fa55e74fe3d59194d44dd..b7903f544b2c303bd904df87c5bfd02c9320805c 100644 (file)
@@ -69,7 +69,7 @@ static int stat_dir_record(
 
   /* Copy the struct to user space. */
   r = sys_safecopyto(who_e, gid, 0, (vir_bytes) &statbuf,
-                    (phys_bytes) sizeof(statbuf), D);
+                    (phys_bytes) sizeof(statbuf));
   
   return(r);
 }
@@ -105,7 +105,7 @@ int fs_fstatfs()
   
   /* Copy the struct to user space. */
   r = sys_safecopyto(fs_m_in.m_source, fs_m_in.REQ_GRANT, 0,
-                    (vir_bytes) &st, (phys_bytes) sizeof(st), D);
+                    (vir_bytes) &st, (phys_bytes) sizeof(st));
   
   return(r);
 }
@@ -134,7 +134,7 @@ int fs_statvfs()
 
   /* Copy the struct to user space. */
   r = sys_safecopyto(fs_m_in.m_source, fs_m_in.REQ_GRANT, 0, (vir_bytes) &st,
-                    (phys_bytes) sizeof(st), D);
+                    (phys_bytes) sizeof(st));
   
   return(r);
 }
index 47f6325a402be04c9ea05083c83912bda950c76d..707ccb03e44c116e11dbbd9abc02c8dd9ad32c1e 100644 (file)
@@ -41,7 +41,7 @@ int fs_link()
   len = min( (unsigned) fs_m_in.REQ_PATH_LEN, sizeof(string));
   /* Copy the link name's last component */
   r = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT,
-                      (vir_bytes) 0, (vir_bytes) string, (size_t) len, D);
+                      (vir_bytes) 0, (vir_bytes) string, (size_t) len);
   if (r != OK) return r;
   NUL(string, len, sizeof(string));
   
@@ -123,7 +123,7 @@ int fs_unlink()
   /* Copy the last component */
   len = min( (unsigned) fs_m_in.REQ_PATH_LEN, sizeof(string));
   r = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT,
-                      (vir_bytes) 0, (vir_bytes) string, (size_t) len, D);
+                      (vir_bytes) 0, (vir_bytes) string, (size_t) len);
   if (r != OK) return r;
   NUL(string, len, sizeof(string));
   
@@ -196,7 +196,7 @@ int fs_rdlink()
        bp = get_block(rip->i_dev, b, NORMAL);
        r = sys_safecopyto(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT,
                           (vir_bytes) 0, (vir_bytes) bp->b_data,
-                          (size_t) copylen, D);
+                          (size_t) copylen);
        put_block(bp, DIRECTORY_BLOCK);
        if (r == OK)
                fs_m_out.RES_NBYTES = copylen;
@@ -298,14 +298,14 @@ int fs_rename()
   /* Copy the last component of the old name */
   len = min( (unsigned) fs_m_in.REQ_REN_LEN_OLD, sizeof(old_name));
   r = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_REN_GRANT_OLD,
-                      (vir_bytes) 0, (vir_bytes) old_name, (size_t) len, D);
+                      (vir_bytes) 0, (vir_bytes) old_name, (size_t) len);
   if (r != OK) return r;
   NUL(old_name, len, sizeof(old_name));
   
   /* Copy the last component of the new name */
   len = min( (unsigned) fs_m_in.REQ_REN_LEN_NEW, sizeof(new_name));
   r = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_REN_GRANT_NEW,
-                      (vir_bytes) 0, (vir_bytes) new_name, (size_t) len, D);
+                      (vir_bytes) 0, (vir_bytes) new_name, (size_t) len);
   if (r != OK) return r;
   NUL(new_name, len, sizeof(new_name));
 
index 12880dfd599600104e5e1be16c1ab3a3f8c2808e..8bf35596916b5485ffabc0d5ebeba3d8eb965fd0 100644 (file)
@@ -72,7 +72,7 @@ int fs_new_driver(void)
        return(EINVAL);
 
   r = sys_safecopyfrom(fs_m_in.m_source, label_gid, (vir_bytes) 0,
-       (vir_bytes) label, label_len, D);
+       (vir_bytes) label, label_len);
 
   if (r != OK) {
        printf("MFS: fs_new_driver safecopyfrom failed (%d)\n", r);
index 43916e39495afb5399f02bdba42b3076174ff08a..2352660f7474bb55fcc4993d61c0e7f3ba902f90 100644 (file)
@@ -34,7 +34,7 @@ int fs_readsuper()
        return(EINVAL);
 
   r = sys_safecopyfrom(fs_m_in.m_source, label_gid, (vir_bytes) 0,
-                      (vir_bytes) fs_dev_label, label_len, D);
+                      (vir_bytes) fs_dev_label, label_len);
   if (r != OK) {
        printf("MFS %s:%d safecopyfrom failed: %d\n", __FILE__, __LINE__, r);
        return(EINVAL);
index a3144dc6146beac40840714221b1fcceedaff8f9..d3a4084f5e075c191a4205f240cd22d9dabac232 100644 (file)
@@ -32,7 +32,7 @@ int fs_create()
   /* Copy the last component (i.e., file name) */
   len = min( (unsigned) fs_m_in.REQ_PATH_LEN, sizeof(lastc));
   err_code = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT,
-                             (vir_bytes) 0, (vir_bytes) lastc, len, D);
+                             (vir_bytes) 0, (vir_bytes) lastc, len);
   if (err_code != OK) return err_code;
   NUL(lastc, len, sizeof(lastc));
 
@@ -79,7 +79,7 @@ int fs_mknod()
   /* Copy the last component and set up caller's user and group id */
   len = min( (unsigned) fs_m_in.REQ_PATH_LEN, sizeof(lastc));
   err_code = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT,
-                           (vir_bytes) 0, (vir_bytes) lastc, (size_t) len, D);
+                           (vir_bytes) 0, (vir_bytes) lastc, (size_t) len);
   if (err_code != OK) return err_code;
   NUL(lastc, len, sizeof(lastc));
   
@@ -114,7 +114,7 @@ int fs_mkdir()
   /* Copy the last component and set up caller's user and group id */
   len = min( (unsigned) fs_m_in.REQ_PATH_LEN, sizeof(lastc));
   err_code = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT,
-                          (vir_bytes) 0, (vir_bytes) lastc, (size_t) len, D);
+                          (vir_bytes) 0, (vir_bytes) lastc, (size_t) len);
   if(err_code != OK) return(err_code);
   NUL(lastc, len, sizeof(lastc));
 
@@ -184,7 +184,7 @@ int fs_slink()
   /* Copy the link name's last component */
   len = min( (unsigned) fs_m_in.REQ_PATH_LEN, sizeof(string));
   r = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT,
-                       (vir_bytes) 0, (vir_bytes) string, (size_t) len, D);
+                       (vir_bytes) 0, (vir_bytes) string, (size_t) len);
   if (r != OK) return(r);
   NUL(string, len, sizeof(string));
   
@@ -206,7 +206,7 @@ int fs_slink()
                r = sys_safecopyfrom(VFS_PROC_NR,
                                     (cp_grant_id_t) fs_m_in.REQ_GRANT3,
                                     (vir_bytes) 0, (vir_bytes) bp->b_data,
-                                    (size_t) fs_m_in.REQ_MEM_SIZE, D);
+                                    (size_t) fs_m_in.REQ_MEM_SIZE);
 
        if(bp != NULL && r == OK) {
                bp->b_data[_MIN_BLOCK_SIZE-1] = '\0';
index f3e03fd5d4de87ab1a14cc098ba82b60b410e99c..73a080affee5fcd3127289eaea49edf439ace43f 100644 (file)
@@ -56,7 +56,7 @@ int fs_lookup()
 
   /* Copy the pathname and set up caller's user and group id */
   r = sys_safecopyfrom(VFS_PROC_NR, grant, /*offset*/ (vir_bytes) 0, 
-            (vir_bytes) user_path, (size_t) len, D);
+            (vir_bytes) user_path, (size_t) len);
   if(r != OK) return(r);
 
   /* Verify this is a null-terminated path. */
@@ -83,7 +83,7 @@ int fs_lookup()
        if(len > path_size) return(ENAMETOOLONG);
 
        r1 = sys_safecopyto(VFS_PROC_NR, grant, (vir_bytes) 0,
-                           (vir_bytes) user_path, (size_t) len, D);
+                           (vir_bytes) user_path, (size_t) len);
        if(r1 != OK) return(r1);
   }
 
index cbf70b8049db4089b6084c88210eef50685a0297..dc2ebd2b259bb90d89840b35398c939dd55ccca7 100644 (file)
@@ -280,7 +280,7 @@ int *completed;                     /* number of bytes copied */
   if (rw_flag == READING) {
        /* Copy a chunk from the block buffer to user space. */
        r = sys_safecopyto(VFS_PROC_NR, gid, (vir_bytes) buf_off,
-                          (vir_bytes) (bp->b_data+off), (size_t) chunk, D);
+                          (vir_bytes) (bp->b_data+off), (size_t) chunk);
   } else if(!block_write_ok(bp)) {
        /* Let cache layer veto writing to this block */
        printf("MFS: block write not allowed\n");
@@ -288,7 +288,7 @@ int *completed;                     /* number of bytes copied */
   } else {
        /* Copy a chunk from user space to the block buffer. */
        r = sys_safecopyfrom(VFS_PROC_NR, gid, (vir_bytes) buf_off,
-                            (vir_bytes) (bp->b_data+off), (size_t) chunk, D);
+                            (vir_bytes) (bp->b_data+off), (size_t) chunk);
        MARKDIRTY(bp);
   }
   
@@ -613,7 +613,7 @@ int fs_getdents(void)
                          r = sys_safecopyto(VFS_PROC_NR, gid,
                                             (vir_bytes) userbuf_off, 
                                             (vir_bytes) getdents_buf,
-                                            (size_t) tmpbuf_off, D);
+                                            (size_t) tmpbuf_off);
                          if (r != OK) {
                                put_inode(rip);
                                return(r);
@@ -651,7 +651,7 @@ int fs_getdents(void)
 
   if(tmpbuf_off != 0) {
          r = sys_safecopyto(VFS_PROC_NR, gid, (vir_bytes) userbuf_off,
-                            (vir_bytes) getdents_buf, (size_t) tmpbuf_off, D);
+                            (vir_bytes) getdents_buf, (size_t) tmpbuf_off);
          if (r != OK) {
                put_inode(rip);
                return(r);
index 6d3d2371a930656b8b4d6b89e4dea09727630dbb..24ec94e2acae435cf780cd186b9533777951daa3 100644 (file)
@@ -80,7 +80,7 @@ static int stat_inode(
 
   /* Copy the struct to user space. */
   r = sys_safecopyto(who_e, gid, (vir_bytes) 0, (vir_bytes) &statbuf,
-               (size_t) sizeof(statbuf), D);
+               (size_t) sizeof(statbuf));
 
   return(r);
 }
@@ -101,7 +101,7 @@ int fs_fstatfs()
   
   /* Copy the struct to user space. */
   r = sys_safecopyto(fs_m_in.m_source, (cp_grant_id_t) fs_m_in.REQ_GRANT,
-                    (vir_bytes) 0, (vir_bytes) &st, (size_t) sizeof(st), D);
+                    (vir_bytes) 0, (vir_bytes) &st, (size_t) sizeof(st));
   
   return(r);
 }
@@ -135,7 +135,7 @@ int fs_statvfs()
 
   /* Copy the struct to user space. */
   r = sys_safecopyto(fs_m_in.m_source, fs_m_in.REQ_GRANT, 0, (vir_bytes) &st,
-                    (phys_bytes) sizeof(st), D);
+                    (phys_bytes) sizeof(st));
   
   return(r);
 }
index 3c12e291e95119b0543dec92a56ec76f8362db90..691c0fddce5b749494d811ccf73befae44d57e9d 100644 (file)
@@ -52,11 +52,11 @@ int fs_readwrite(message *fs_m_in, message *fs_m_out)
   if (rw_flag == READING) {
        /* Copy a chunk from the block buffer to user space. */
        r = sys_safecopyto(VFS_PROC_NR, gid, (vir_bytes) 0,
-               (vir_bytes) (bp->b_data+position), (size_t) nrbytes, D);
+               (vir_bytes) (bp->b_data+position), (size_t) nrbytes);
   } else {
        /* Copy a chunk from user space to the block buffer. */
        r = sys_safecopyfrom(VFS_PROC_NR, gid, (vir_bytes) 0,
-               (vir_bytes) (bp->b_data+position), (size_t) nrbytes, D);
+               (vir_bytes) (bp->b_data+position), (size_t) nrbytes);
   }
 
   if (r == OK) {
index e594c3f0de965f2b23a4aa5b213dedd88f5c7afb..6a9fa37db76f2dc6868207a6eb861d2955426782 100644 (file)
@@ -48,7 +48,7 @@ static int stat_inode(
 
   /* Copy the struct to user space. */
   r = sys_safecopyto(who_e, gid, (vir_bytes) 0, (vir_bytes) &statbuf,
-               (size_t) sizeof(statbuf), D);
+               (size_t) sizeof(statbuf));
 
   return(r);
 }
index 42cc015632bddc27b29d4b26315239d163ec039b..a8a4fc46d9b13a0b4b77330bef1c67554c4af20a 100644 (file)
@@ -303,8 +303,7 @@ int do_accept(message *dev_m_in, message *dev_m_out)
 
        /* Get the server's address */
        rc = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) dev_m_in->IO_GRANT,
-               (vir_bytes) 0, (vir_bytes) &addr, sizeof(struct sockaddr_un),
-               D);
+               (vir_bytes) 0, (vir_bytes) &addr, sizeof(struct sockaddr_un));
 
        if (rc != OK) {
                return EIO;
@@ -424,7 +423,7 @@ int do_connect(message *dev_m_in, message *dev_m_out)
 
        rc = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) dev_m_in->IO_GRANT,
                                (vir_bytes) 0, (vir_bytes) &addr,
-                               sizeof(struct sockaddr_un), D);
+                               sizeof(struct sockaddr_un));
 
        if (rc != OK) {
                return EIO;
@@ -594,7 +593,7 @@ int do_listen(message *dev_m_in, message *dev_m_out)
         * don't allow the backlog to shrink
         */
        rc = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) dev_m_in->IO_GRANT,
-               (vir_bytes) 0, (vir_bytes) &backlog_size, sizeof(int), D);
+               (vir_bytes) 0, (vir_bytes) &backlog_size, sizeof(int));
 
        if (rc != OK) {
                return EIO;
@@ -658,7 +657,7 @@ int do_socket(message *dev_m_in, message *dev_m_out)
        /* get the requested type */
        rc = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) dev_m_in->IO_GRANT,
                (vir_bytes) 0, (vir_bytes) &(uds_fd_table[minor].type),
-               sizeof(int), D);
+               sizeof(int));
 
        if (rc != OK) {
 
@@ -713,8 +712,7 @@ int do_bind(message *dev_m_in, message *dev_m_out)
        }
 
        rc = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) dev_m_in->IO_GRANT,
-               (vir_bytes) 0, (vir_bytes) &addr, sizeof(struct sockaddr_un),
-               D);
+               (vir_bytes) 0, (vir_bytes) &addr, sizeof(struct sockaddr_un));
 
        if (rc != OK) {
                return EIO;
@@ -777,7 +775,7 @@ int do_getsockname(message *dev_m_in, message *dev_m_out)
         */
        rc = sys_safecopyto(VFS_PROC_NR, (cp_grant_id_t) dev_m_in->IO_GRANT,
                (vir_bytes) 0, (vir_bytes) &(uds_fd_table[minor].addr),
-               sizeof(struct sockaddr_un), D);
+               sizeof(struct sockaddr_un));
 
        return rc ? EIO : OK;
 }
@@ -805,7 +803,7 @@ int do_getpeername(message *dev_m_in, message *dev_m_out)
                rc = sys_safecopyto(VFS_PROC_NR,
                        (cp_grant_id_t) dev_m_in->IO_GRANT, (vir_bytes) 0,
                        (vir_bytes) &(uds_fd_table[peer_minor].addr),
-                       sizeof(struct sockaddr_un), D);
+                       sizeof(struct sockaddr_un));
 
                return rc ? EIO : OK;
        } else {
@@ -850,7 +848,7 @@ int do_shutdown(message *dev_m_in, message *dev_m_out)
 
        /* get the 'how' parameter from the process */
        rc = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) dev_m_in->IO_GRANT,
-                       (vir_bytes) 0, (vir_bytes) &how, sizeof(int), D);
+                       (vir_bytes) 0, (vir_bytes) &how, sizeof(int));
 
        if (rc != OK) {
                return EIO;
@@ -900,7 +898,7 @@ int do_socketpair_old(message *dev_m_in, message *dev_m_out)
 
        /* third ioctl param is the minor number of the second socket */
        rc = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) dev_m_in->IO_GRANT,
-                       (vir_bytes) 0, (vir_bytes) &minorin, sizeof(short), D);
+                       (vir_bytes) 0, (vir_bytes) &minorin, sizeof(short));
 
        if (rc != OK) {
                return EIO;
@@ -947,7 +945,7 @@ int do_socketpair(message *dev_m_in, message *dev_m_out)
 
        /* third ioctl param is the minor number of the second socket */
        rc = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) dev_m_in->IO_GRANT,
-                       (vir_bytes) 0, (vir_bytes) &minorin, sizeof(dev_t), D);
+                       (vir_bytes) 0, (vir_bytes) &minorin, sizeof(dev_t));
 
        if (rc != OK) {
                return EIO;
@@ -999,7 +997,7 @@ int do_getsockopt_sotype(message *dev_m_in, message *dev_m_out)
 
        rc = sys_safecopyto(VFS_PROC_NR, (cp_grant_id_t) dev_m_in->IO_GRANT,
                (vir_bytes) 0, (vir_bytes) &(uds_fd_table[minor].type),
-               sizeof(int), D);
+               sizeof(int));
 
        return rc ? EIO : OK;
 }
@@ -1040,7 +1038,7 @@ int do_getsockopt_peercred(message *dev_m_in, message *dev_m_out)
        }
 
        rc = sys_safecopyto(VFS_PROC_NR, (cp_grant_id_t) dev_m_in->IO_GRANT,
-               (vir_bytes) 0, (vir_bytes) &cred, sizeof(struct ucred), D);
+               (vir_bytes) 0, (vir_bytes) &cred, sizeof(struct ucred));
 
        return rc ? EIO : OK;
 }
@@ -1087,8 +1085,7 @@ int do_getsockopt_peercred_old(message *dev_m_in, message *dev_m_out)
        cred_old.gid = (char) cred.gid;
 
        rc = sys_safecopyto(VFS_PROC_NR, (cp_grant_id_t) dev_m_in->IO_GRANT,
-               (vir_bytes) 0, (vir_bytes) &cred_old, sizeof(struct ucred_old),
-               D);
+               (vir_bytes) 0, (vir_bytes) &cred_old, sizeof(struct ucred_old));
 
        return rc ? EIO : OK;
 }
@@ -1108,8 +1105,7 @@ int do_getsockopt_sndbuf(message *dev_m_in, message *dev_m_out)
        minor = uds_minor(dev_m_in);
 
        rc = sys_safecopyto(VFS_PROC_NR, (cp_grant_id_t) dev_m_in->IO_GRANT,
-               (vir_bytes) 0, (vir_bytes) &(sndbuf),
-               sizeof(size_t), D);
+               (vir_bytes) 0, (vir_bytes) &(sndbuf), sizeof(size_t));
 
        return rc ? EIO : OK;
 }
@@ -1131,7 +1127,7 @@ int do_setsockopt_sndbuf(message *dev_m_in, message *dev_m_out)
 
        rc = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) dev_m_in->IO_GRANT,
                                (vir_bytes) 0, (vir_bytes) &sndbuf,
-                               sizeof(size_t), D);
+                               sizeof(size_t));
 
        if (rc != OK) {
                return EIO;
@@ -1163,8 +1159,7 @@ int do_getsockopt_rcvbuf(message *dev_m_in, message *dev_m_out)
        minor = uds_minor(dev_m_in);
 
        rc = sys_safecopyto(VFS_PROC_NR, (cp_grant_id_t) dev_m_in->IO_GRANT,
-               (vir_bytes) 0, (vir_bytes) &(rcvbuf),
-               sizeof(size_t), D);
+               (vir_bytes) 0, (vir_bytes) &(rcvbuf), sizeof(size_t));
 
        return rc ? EIO : OK;
 }
@@ -1186,7 +1181,7 @@ int do_setsockopt_rcvbuf(message *dev_m_in, message *dev_m_out)
 
        rc = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) dev_m_in->IO_GRANT,
                                (vir_bytes) 0, (vir_bytes) &rcvbuf,
-                               sizeof(size_t), D);
+                               sizeof(size_t));
 
        if (rc != OK) {
                return EIO;
@@ -1224,8 +1219,7 @@ int do_sendto(message *dev_m_in, message *dev_m_out)
        }
 
        rc = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) dev_m_in->IO_GRANT,
-               (vir_bytes) 0, (vir_bytes) &addr, sizeof(struct sockaddr_un),
-               D);
+               (vir_bytes) 0, (vir_bytes) &addr, sizeof(struct sockaddr_un));
 
        if (rc != OK) {
                return EIO;
@@ -1263,7 +1257,7 @@ int do_recvfrom(message *dev_m_in, message *dev_m_out)
 
        rc = sys_safecopyto(VFS_PROC_NR, (cp_grant_id_t) dev_m_in->IO_GRANT,
                (vir_bytes) 0, (vir_bytes) &(uds_fd_table[minor].source),
-               sizeof(struct sockaddr_un), D);
+               sizeof(struct sockaddr_un));
 
        return rc ? EIO : OK;
 }
@@ -1491,7 +1485,7 @@ int do_sendmsg(message *dev_m_in, message *dev_m_out)
 
        rc = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) dev_m_in->IO_GRANT,
                                        (vir_bytes) 0, (vir_bytes) &msg_ctrl,
-                                       sizeof(struct msg_control), D);
+                                       sizeof(struct msg_control));
 
        if (rc != OK) {
                return EIO;
@@ -1580,7 +1574,7 @@ int do_recvmsg(message *dev_m_in, message *dev_m_out)
         */
        rc = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) dev_m_in->IO_GRANT,
                                        (vir_bytes) 0, (vir_bytes) &msg_ctrl,
-                                       sizeof(struct msg_control), D);
+                                       sizeof(struct msg_control));
 
        if (rc != OK) {
                return EIO;
@@ -1617,7 +1611,7 @@ int do_recvmsg(message *dev_m_in, message *dev_m_out)
        /* send the user the control data */
        rc = sys_safecopyto(VFS_PROC_NR, (cp_grant_id_t) dev_m_in->IO_GRANT,
                (vir_bytes) 0, (vir_bytes) &msg_ctrl,
-               sizeof(struct msg_control), D);
+               sizeof(struct msg_control));
 
        return rc ? EIO : OK;
 }
index 8a319176f2e45c9ec563853eaee923ca989c37b4..04858e8a3ff119e2b779875528eb08e3d526a54b 100644 (file)
@@ -539,7 +539,7 @@ static int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *info)
 
   /* Map all the services in the boot image. */
   if ((s = sys_safecopyfrom(RS_PROC_NR, info->rproctab_gid, 0,
-                           (vir_bytes) rprocpub, sizeof(rprocpub), S)) != OK){
+                           (vir_bytes) rprocpub, sizeof(rprocpub))) != OK){
        panic("sys_safecopyfrom failed: %d", s);
   }
   for (i = 0; i < NR_BOOT_PROCS; i++) {
index 6e8c2f8dfc557e2a22bdd1b3316787ddcaab0247..386fae80cc484a19622f200df73c9f8ce939281a 100644 (file)
@@ -748,7 +748,7 @@ size_t pathlen;
 
   rfp = &(fproc[slot]);
   r = sys_safecopyfrom(PFS_PROC_NR, io_gr, (vir_bytes) 0,
-                               (vir_bytes) canon_path, pathlen, D);
+                               (vir_bytes) canon_path, pathlen);
   if (r != OK) return(r);
   canon_path[pathlen] = '\0';
 
@@ -760,7 +760,7 @@ size_t pathlen;
 
   /* copy canon_path back to PFS */
   r = sys_safecopyto(PFS_PROC_NR, (cp_grant_id_t) io_gr, (vir_bytes) 0,
-                               (vir_bytes) canon_path, pathlen, D);
+                               (vir_bytes) canon_path, pathlen);
   if (r != OK) return(r);
 
   /* Now do permissions checking */
index 487f1eb4e12dd70c72d9afe1ec630ff78d04b524..9acc02b0cc6cca0475614c4c500a961301b4d793 100644 (file)
@@ -381,7 +381,7 @@ static int sef_cb_init_fresh(int type, sef_init_info_t *info)
 
        /* Map all the services in the boot image. */
        if((s = sys_safecopyfrom(RS_PROC_NR, info->rproctab_gid, 0,
-               (vir_bytes) rprocpub, sizeof(rprocpub), S)) != OK) {
+               (vir_bytes) rprocpub, sizeof(rprocpub))) != OK) {
                panic("sys_safecopyfrom failed: %d", s);
        }
        for(i=0;i < NR_BOOT_PROCS;i++) {
index a69cf9c923e8bb39f36f8d452344bcbfc1cea130..9702dc1ce2735d831748067d62794039aaa0908f 100644 (file)
@@ -19,7 +19,7 @@ static int do_request(message *m)
        access = m->VTR_ACCESS;
 
        r2 = sys_safecopyfrom(m->m_source, m->VTR_VGRANT, 0, (vir_bytes) vvec,
-               sizeof(vvec[0]) * vcount, D);
+               sizeof(vvec[0]) * vcount);
        assert(r2 == OK);
 
        r = sys_vumap(m->m_source, vvec, vcount, offset, access, pvec,
@@ -27,7 +27,7 @@ static int do_request(message *m)
 
        if (pcount >= 1 && pcount <= MAPVEC_NR + 3) {
                r2 = sys_safecopyto(m->m_source, m->VTR_PGRANT, 0,
-                       (vir_bytes) pvec, sizeof(pvec[0]) * pcount, D);
+                       (vir_bytes) pvec, sizeof(pvec[0]) * pcount);
                assert(r2 == OK);
        }
 
index 7f4750847d0f324cc8613f50a25733e4de68950a..4c1ef9b682af92eb3ed694632c6a7b60716d45ea 100644 (file)
@@ -17,7 +17,7 @@ int test(size_t size)
 
        /* Timing. */
        read_tsc(&high1, &low1);
-       r = sys_safecopyfrom(ep_granter, gid, 0, (long)buf, size, D);
+       r = sys_safecopyfrom(ep_granter, gid, 0, (long)buf, size);
        read_tsc(&high2, &low2);
        if(r != OK) {
                printf("REQUESTOR: error in safecopy: %d\n", r);
index a82300ed2cd87af9051fd044741ae1e98d7dfb9a..e4159bed7f14b45169b3009618ed0fb62b99c828 100644 (file)
@@ -126,7 +126,7 @@ int main(int argc, char **argv)
        /* Test COW_SMAP2 (with COW safecopy). */
        FIFO_WAIT(fid_get);
        buf[0] = BUF_START_REQUESTOR;
-       r = sys_safecopyto(ep_granter, gid, 0, (long)buf, size, D);
+       r = sys_safecopyto(ep_granter, gid, 0, (long)buf, size);
        if(r != OK) {
                printf("REQUESTOR: error in sys_safecopyto: %d\n", r);
                return 1;
index 8b193ee5d4c674b786a10bb32878d5863a92645e..bbb9642c7527724c52bbaa5867b875876744986a 100644 (file)
@@ -136,7 +136,7 @@ int main(int argc, char **argv)
                for(i=0;i<NR_TEST_ITERATIONS;i++) {
                        read_tsc_64(&start);
                        r = sys_safecopyfrom(ep_granter, gid, 0, (long)buf,
-                               nr_pages*CLICK_SIZE, D);
+                               nr_pages*CLICK_SIZE);
                        if(r != OK) {
                                printf("REQUESTOR: safecopy error: %d\n", r);
                                return 1;