linux/mm/process_vm_access.c
<<
>>
dd" > .16.1" ls_vm_acces_results"lick="re_acces_results"> v2.6.16.11" 1" ls_vmcontenaja 1" ls_vmfile_contena3.1 #L1ess_vmL1esick="retineesn> 16.1 < onclick="recommenaja/*alue="v2<.6.16.54 #L2ess_vmL2esick="retineesn> 16.2 < onclick="recommenaja * #L3ess_vmL3esick="retineesn> 16.3 < onclick="recommenaja *alue="v2<.6.16.54 #L4ess_vmL4esick="retineesn> 16.4 < onclick="recommenaja * Copys);"> (C) 2010-2011 Christopher Yeoh <cyeoh@au1.ibm.compe=", IBM Corp.alue="v2<.6.16.54 #L5ess_vmL5esick="retineesn> 16.5 < onclick="recommenaja *alue="v2<.6.16.54 #L6ess_vmL6esick="retineesn> 16.6 < onclick="recommenaja * T>Se ptigram Se free software; you cnclredistrin=me it and/oralue="v2<.6.16.54 #L7ess_vmL7esick="retineesn> 16.7 < onclick="recommenaja * modify it under the terms of the GNU General Pubion Licensealue="v2<.6.16.54 #L8ess_vmL8esick="retineesn> 16.8 < onclick="recommenaja * ae pubioshed by the Free Software Founda > ; either vers> alue="v2<.6.16.54 #L9ess_vmL9esick="retineesn> 16.9 < onclick="recommenaja * 2 of the License, or (at your ght.pn) any later vers> .alue="v2<.6.16.54 #L10ess_vmL10esick="retineesn> 16 val < onclick="recommenaja */alue="v2<.6.16.54 #L11ess_vmL11esick="retineesn> 1611 <2<.6.16.54 #L12ess_vmL12esick="retineesn> 1612 <#iptiude <<.6.16.54iptiude/ #L13ess_vmL13esick="retineesn> 1613 <#iptiude <<.6.16.54iptiude/ #L14ess_vmL14esick="retineesn> 1614 <#iptiude <<.6.16.54iptiude/ #L15ess_vmL15esick="retineesn> 1615 <#iptiude <<.6.16.54iptiude/ #L16ess_vmL16esick="retineesn> 1616 <#iptiude <<.6.16.54iptiude/ #L17ess_vmL17esick="retineesn> 1617 <#iptiude <<.6.16.54iptiude/ #L18ess_vmL18esick="retineesn> 1618 <#iptiude <<.6.16.54iptiude/ #L19ess_vmL19esick="retineesn> 1619 <2<.6.16.54 #L20ess_vmL20esick="retineesn> 1620 <#ifdefv2.6.16.54CONFIG_COMPAT <2<.6.16.54 #L21ess_vmL21esick="retineesn> 1621 <#iptiude <<.6.16.54iptiude/ #L22ess_vmL22esick="retineesn> 1622 <#endif2<.6.16.54 #L23ess_vmL23esick="retineesn> 1623 <2<.6.16.54 #L24ess_vmL24esick="retineesn> 1624 < onclick="recommenaja/**alue="v2<.6.16.54 #L25ess_vmL25esick="retineesn> 1625 < onclick="recommenaja * ptio(this);rw_pages -lread/wrime pages from task specifiedalue="v2<.6.16.54 #L26ess_vmL26esick="retineesn> 1626 < onclick="recommenaja * @task: task tolread/wrime fromalue="v2<.6.16.54 #L27ess_vmL27esick="retineesn> 1627 < onclick="recommenaja * @mm: mm vm_ taskalue="v2<.6.16.54 #L28ess_vmL28esick="retineesn> 1628 < onclick="recommenaja * @ptio(thipages: struct pages area that cnclstore at leastalue="v2<.6.16.54 #L29ess_vmL29esick="retineesn> 1629 < onclick="recommenaja * nripages_to_copy struct page pointersalue="v2<.6.16.54 #L30ess_vmL30esick="retineesn> 163val < onclick="recommenaja * @pa: addr of page in task tolstart copying from/toalue="v2<.6.16.54 #L31ess_vmL31esick="retineesn> 1631 < onclick="recommenaja * @start_offset: offset in page tolstart copying from/toalue="v2<.6.16.54 #L32ess_vmL32esick="retineesn> 1632 < onclick="recommenaja * @len: number of bytes tolcopyalue="v2<.6.16.54 #L33ess_vmL33esick="retineesn> 1633 < onclick="recommenaja * @lvec: iovec array specifying where tolcopy to/fromalue="v2<.6.16.54 #L34ess_vmL34esick="retineesn> 1634 < onclick="recommenaja * @lvec_cnt: number of elemenas in iovec arrayalue="v2<.6.16.54 #L35ess_vmL35esick="retineesn> 1635 < onclick="recommenaja * @lvec_current: index in iovec array we are up toalue="v2<.6.16.54 #L36ess_vmL36esick="retineesn> 1636 < onclick="recommenaja * @lvec_offset: offset in bytes from current iovec iov_base we are up toalue="v2<.6.16.54 #L37ess_vmL37esick="retineesn> 1637 < onclick="recommenaja * @s);wrime: 0 meanslcopy from, 1 meanslcopy toalue="v2<.6.16.54 #L38ess_vmL38esick="retineesn> 1638 < onclick="recommenaja * @nripages_to_copy: number of pages tolcopyalue="v2<.6.16.54 #L39ess_vmL39esick="retineesn> 1639 < onclick="recommenaja * @bytes_copied: .27.53s number of bytes su> fully copiedalue="v2<.6.16.54 #L40ess_vmL40esick="retineesn> 164val < onclick="recommenaja * R27.53s 0 on su> , errm_ code otherwisealue="v2<.6.16.54 #L41ess_vmL41esick="retineesn> 1641 < onclick="recommenaja */alue="v2<.6.16.54 #L42ess_vmL42esick="retineesn> 1642 <_searc intv2.6.16.54ptio(this);rw_pages <(struct 2.6.16.54task_struct < *2.6.16.54task <,2<.6.16.54 #L43ess_vmL43esick="retineesn> 1643 < struct 2.6.16.54mm_struct < *2.6.16.54mm <,2<.6.16.54 #L44ess_vmL44esick="retineesn> 1644 < struct 2.6.16.54page < **2.6.16.54ptio(thipages <,2<.6.16.54 #L45ess_vmL45esick="retineesn> 1645 < unsigned long 2.6.16.54pa <,2<.6.16.54 #L46ess_vmL46esick="retineesn> 1646 < unsigned long 2.6.16.54start_offset <,2<.6.16.54 #L47ess_vmL47esick="retineesn> 1647 < unsigned long 2.6.16.54l/s <,2<.6.16.54 #L48ess_vmL48esick="retineesn> 1648 < const struct 2.6.16.54iovec < *2.6.16.54lvec <,2<.6.16.54 #L49ess_vmL49esick="retineesn> 1649 < unsigned long 2.6.16.54lvec_cnt <,2<.6.16.54 #L50ess_vmL50esick="retineesn> 1650 < unsigned long *2.6.16.54lvec_current <,2<.6.16.54 #L51ess_vmL51esick="retineesn> 1651 < 2.6.16.54size_t < *2.6.16.54lvec_offset <,2<.6.16.54 #L52ess_vmL52esick="retineesn> 1652 < intv2.6.16.54s);wrime <,2<.6.16.54 #L53ess_vmL53esick="retineesn> 1653 < unsigned intv2.6.16.54nripages_to_copy <,2<.6.16.54 #L54ess_vmL54esick="retineesn> 1654 < 2.6.16.54ssize_t < *2.6.16.54bytes_copied <)2<.6.16.54 #L55ess_vmL55esick="retineesn> 1655 <{2<.6.16.54 #L56ess_vmL56esick="retineesn> 1656 < intv2.6.16.54pages_pinned <"2<.6.16.54 #L57ess_vmL57esick="retineesn> 1657 < void *2.6.16.54taclas_kaddr <"2<.6.16.54 #L58ess_vmL58esick="retineesn> 1658 < intv2.6.16.54pgs_copied < = 0"2<.6.16.54 #L59ess_vmL59esick="retineesn> 1659 < intv2.6.16.54j <"2<.6.16.54 #L60ess_vmL60esick="retineesn> 1660 < intv2.6.16.54ret <"2<.6.16.54 #L61ess_vmL61esick="retineesn> 1661 < 2.6.16.54ssize_t < 2.6.16.54bytes_to_copy <"2<.6.16.54 #L62ess_vmL62esick="retineesn> 1662 < 2.6.16.54ssize_t < 2.6.16.54rc < = 0"2<.6.16.54 #L63ess_vmL63esick="retineesn> 1663 <2<.6.16.54 #L64ess_vmL64esick="retineesn> 1664 < *2.6.16.54bytes_copied < = 0"2<.6.16.54 #L65ess_vmL65esick="retineesn> 1665 <2<.6.16.54 #L66ess_vmL66esick="retineesn> 1666 < onclick="recommenaja/* Get the pages we're interested in */alue="v2<.6.16.54 #L67ess_vmL67esick="retineesn> 1667 < 2.6.16.54down_read <(&2.6.16.54mm <-pe="2.6.16.54mmap_sem <)"2<.6.16.54 #L68ess_vmL68esick="retineesn> 1668 < 2.6.16.54pages_pinned < = 2.6.16.54las_useripages <(2.6.16.54task <, 2.6.16.54mm <, 2.6.16.54pa <,2<.6.16.54 #L69ess_vmL69esick="retineesn> 1669 < 2.6.16.54nripages_to_copy <,2<.6.16.54 #L70ess_vmL70esick="retineesn> 1670 < 2.6.16.54s);wrime <, 0, 2.6.16.54ptio(thipages <, 2.6.16.54NULL <)"2<.6.16.54 #L71ess_vmL71esick="retineesn> 1671 < 2.6.16.54up_read <(&2.6.16.54mm <-pe="2.6.16.54mmap_sem <)"2<.6.16.54 #L72ess_vmL72esick="retineesn> 1672 <2<.6.16.54 #L73ess_vmL73esick="retineesn> 1673 < if (2.6.16.54pages_pinned < != 2.6.16.54nripages_to_copy <) {2<.6.16.54 #L74ess_vmL74esick="retineesn> 1674 < 2.6.16.54rc < = -2.6.16.54EFAULT <"2<.6.16.54 #L75ess_vmL75esick="retineesn> 1675 < goto 2.6.16.54end <"2<.6.16.54 #L76ess_vmL76esick="retineesn> 1676 < }2<.6.16.54 #L77ess_vmL77esick="retineesn> 1677 <2<.6.16.54 #L78ess_vmL78esick="retineesn> 1678 < onclick="recommenaja/* Do the copy for each page */alue="v2<.6.16.54 #L79ess_vmL79esick="retineesn> 1679 < for (2.6.16.54pgs_copied < = 0"2<.6.16.54 #L80ess_vmL80esick="retineesn> 1680 < (2.6.16.54pgs_copied < < 2.6.16.54nripages_to_copy <) && (*2.6.16.54lvec_current < < 2.6.16.54lvec_cnt <)"2<.6.16.54 #L81ess_vmL81esick="retineesn> 1681 < 2.6.16.54pgs_copied <++) {2<.6.16.54 #L82ess_vmL82esick="retineesn> 1682 < onclick="recommenaja/* Make sure we have a non zero length iovec */alue="v2<.6.16.54 #L83ess_vmL83esick="retineesn> 1683 < while (*2.6.16.54lvec_current < < 2.6.16.54lvec_cnt <2<.6.16.54 #L84ess_vmL84esick="retineesn> 1684 < && 2.6.16.54lvec <[*2.6.16.54lvec_current <].2.6.16.54iov_l/s < == 0)2<.6.16.54 #L85ess_vmL85esick="retineesn> 1685 < (*2.6.16.54lvec_current <)++"2<.6.16.54 #L86ess_vmL86esick="retineesn> 1686 < if (*2.6.16.54lvec_current < == 2.6.16.54lvec_cnt <)2<.6.16.54 #L87ess_vmL87esick="retineesn> 1687 < break"2<.6.16.54 #L88ess_vmL88esick="retineesn> 1688 <2<.6.16.54 #L89ess_vmL89esick="retineesn> 1689 < onclick="recommenaja/*alue="v2<.6.16.54 #L90ess_vmL90esick="retineesn> 169val < onclick="recommenaja * Will copy smallest of:alue="v2<.6.16.54 #L91ess_vmL91esick="retineesn> 1691 < onclick="recommenaja * - bytes remaining in pagealue="v2<.6.16.54 #L92ess_vmL92esick="retineesn> 1692 < onclick="recommenaja * - bytes remaining in destina > iovec ue="v2<.6.16.54 #L93ess_vmL93esick="retineesn> 1693 < onclick="recommenaja */alue="v2<.6.16.54 #L94ess_vmL94esick="retineesn> 1694 < 2.6.16.54bytes_to_copy < = 2.6.16.54min_t <(2.6.16.54ssize_t <, 2.6.16.54PAGE_SIZE < - 2.6.16.54start_offset <,2<.6.16.54 #L95ess_vmL95esick="retineesn> 1695 < 2.6.16.54l/s < - *2.6.16.54bytes_copied <)"2<.6.16.54 #L96ess_vmL96esick="retineesn> 1696 < 2.6.16.54bytes_to_copy < = 2.6.16.54min_t <(2.6.16.54ssize_t <, 2.6.16.54bytes_to_copy <,2<.6.16.54 #L97ess_vmL97esick="retineesn> 1697 < 2.6.16.54lvec <[*2.6.16.54lvec_current <].2.6.16.54iov_l/s <2<.6.16.54 #L98ess_vmL98esick="retineesn> 1698 < - *2.6.16.54lvec_offset <)"2<.6.16.54 #L99ess_vmL99esick="retineesn> 1699 <2<.6.16.54 #L100ess_vmL100esick="retineesn> 1100 < 2.6.16.54taclas_kaddr < = 2.6.16.54kmap <(2.6.16.54ptio(thipages <[2.6.16.54pgs_copied <]) + 2.6.16.54start_offset <"2<.6.16.54 #L101ess_vmL101esick="retineesn> 1101 <2<.6.16.54 #L102ess_vmL102esick="retineesn> 1102 < if (2.6.16.54s);wrime <)2<.6.16.54 #L103ess_vmL103esick="retineesn> 1103 < 2.6.16.54ret < = 2.6.16.54copy_from_user <(2.6.16.54taclas_kaddr <,2<.6.16.54 #L104ess_vmL104esick="retineesn> 1104 < 2.6.16.54lvec <[*2.6.16.54lvec_current <].2.6.16.54iov_base <2<.6.16.54 #L105ess_vmL105esick="retineesn> 1105 < + *2.6.16.54lvec_offset <,2<.6.16.54 #L106ess_vmL106esick="retineesn> 1106 < 2.6.16.54bytes_to_copy <)"2<.6.16.54 #L107ess_vmL107esick="retineesn> 1107 < else2<.6.16.54 #L108ess_vmL108esick="retineesn> 1108 < 2.6.16.54ret < = 2.6.16.54copy_to_user <(2.6.16.54lvec <[*2.6.16.54lvec_current <].2.6.16.54iov_base <2<.6.16.54 #L109ess_vmL109esick="retineesn> 1109 < + *2.6.16.54lvec_offset <,2<.6.16.54 #L110ess_vmL110esick="retineesn> 1110 < 2.6.16.54taclas_kaddr <, 2.6.16.54bytes_to_copy <)"2<.6.16.54 #L111ess_vmL111esick="retineesn> 1111 < 2.6.16.54kunmap <(2.6.16.54ptio(thipages <[2.6.16.54pgs_copied <])"2<.6.16.54 #L112ess_vmL112esick="retineesn> 1112 < if (2.6.16.54ret <) {2<.6.16.54 #L113ess_vmL113esick="retineesn> 1113 < *2.6.16.54bytes_copied < += 2.6.16.54bytes_to_copy < - 2.6.16.54ret <"2<.6.16.54 #L114ess_vmL114esick="retineesn> 1114 < 2.6.16.54pgs_copied <++"2<.6.16.54 #L115ess_vmL115esick="retineesn> 1115 < 2.6.16.54rc < = -2.6.16.54EFAULT <"2<.6.16.54 #L116ess_vmL116esick="retineesn> 1116 < goto 2.6.16.54end <"2<.6.16.54 #L117ess_vmL117esick="retineesn> 1117 < }2<.6.16.54 #L118ess_vmL118esick="retineesn> 1118 < *2.6.16.54bytes_copied < += 2.6.16.54bytes_to_copy <"2<.6.16.54 #L119ess_vmL119esick="retineesn> 1119 < *2.6.16.54lvec_offset < += 2.6.16.54bytes_to_copy <"2<.6.16.54 #L120ess_vmL120esick="retineesn> 1120 < if (*2.6.16.54lvec_offset < == 2.6.16.54lvec <[*2.6.16.54lvec_current <].2.6.16.54iov_l/s <) {2<.6.16.54 #L121ess_vmL121esick="retineesn> 1121 < onclick="recommenaja/*alue="v2<.6.16.54 #L122ess_vmL122esick="retineesn> 1122 < onclick="recommenaja * Need tolcopy remaining part of page into thealue="v2<.6.16.54 #L123ess_vmL123esick="retineesn> 1123 < onclick="recommenaja * next iovec if there are any bytes left in pagealue="v2<.6.16.54 #L124ess_vmL124esick="retineesn> 1124 < onclick="recommenaja */alue="v2<.6.16.54 #L125ess_vmL125esick="retineesn> 1125 < (*2.6.16.54lvec_current <)++"2<.6.16.54 #L126ess_vmL126esick="retineesn> 1126 < *2.6.16.54lvec_offset < = 0"2<.6.16.54 #L127ess_vmL127esick="retineesn> 1127 < 2.6.16.54start_offset < = (2.6.16.54start_offset < + 2.6.16.54bytes_to_copy <)2<.6.16.54 #L128ess_vmL128esick="retineesn> 1128 < % 2.6.16.54PAGE_SIZE <"2<.6.16.54 #L129ess_vmL129esick="retineesn> 1129 < if (2.6.16.54start_offset <)2<.6.16.54 #L130ess_vmL130esick="retineesn> 1130 < 2.6.16.54pgs_copied <--"2<.6.16.54 #L131ess_vmL131esick="retineesn> 1131 < } else {2<.6.16.54 #L132ess_vmL132esick="retineesn> 1132 < 2.6.16.54start_offset < = 0"2<.6.16.54 #L133ess_vmL133esick="retineesn> 1133 < }2<.6.16.54 #L134ess_vmL134esick="retineesn> 1134 < }2<.6.16.54 #L135ess_vmL135esick="retineesn> 1135 <2<.6.16.54 #L136ess_vmL136esick="retineesn> 1136 < .6.16.54end <:2<.6.16.54 #L137ess_vmL137esick="retineesn> 1137 < if (2.6.16.54s);wrime <) {2<.6.16.54 #L138ess_vmL138esick="retineesn> 1138 < for (2.6.16.54j < = 0"v2.6.16.54j < < 2.6.16.54pages_pinned <"v2.6.16.54j <++) {2<.6.16.54 #L139ess_vmL139esick="retineesn> 1139 < if (2.6.16.54j < < 2.6.16.54pgs_copied <)2<.6.16.54 #L140ess_vmL140esick="retineesn> 1140 < 2.6.16.54setipage_dirty_lock <(2.6.16.54ptio(thipages <[2.6.16.54j <])"2<.6.16.54 #L141ess_vmL141esick="retineesn> 1141 < .6.16.54putipage <(2.6.16.54ptio(thipages <[2.6.16.54j <])"2<.6.16.54 #L142ess_vmL142esick="retineesn> 1142 < }2<.6.16.54 #L143ess_vmL143esick="retineesn> 1143 < } else {2<.6.16.54 #L144ess_vmL144esick="retineesn> 1144 < for (2.6.16.54j < = 0"v2.6.16.54j < < 2.6.16.54pages_pinned <"v2.6.16.54j <++)2<.6.16.54 #L145ess_vmL145esick="retineesn> 1145 < .6.16.54putipage <(2.6.16.54ptio(thipages <[2.6.16.54j <])"2<.6.16.54 #L146ess_vmL146esick="retineesn> 1146 < }2<.6.16.54 #L147ess_vmL147esick="retineesn> 1147 <2<.6.16.54 #L148ess_vmL148esick="retineesn> 1148 < .27.53"2.6.16.54rc <"2<.6.16.54 #L149ess_vmL149esick="retineesn> 1149 <}2<.6.16.54 #L150ess_vmL150esick="retineesn> 1150 <2<.6.16.54 #L151ess_vmL151esick="retineesn> 1151 < onclick="recommenaja/* Maximum number of pages kmalloc'd tolhold struct page's during copy */alue="v2<.6.16.54 #L152ess_vmL152esick="retineesn> 1152 <#define 2.6.16.54PVM_MAX_KMALLOC_PAGES < (2.6.16.54PAGE_SIZE < * 2)2<.6.16.54 #L153ess_vmL153esick="retineesn> 1153 <2<.6.16.54 #L154ess_vmL154esick="retineesn> 1154 < onclick="recommenaja/**alue="v2<.6.16.54 #L155ess_vmL155esick="retineesn> 1155 < onclick="recommenaja * ptio(this);rw_single_vec -lread/wrime pages from task specifiedalue="v2<.6.16.54 #L156ess_vmL156esick="retineesn> 1156 < onclick="recommenaja * @addr:lstart memory addr of taclas ptio(thalue="v2<.6.16.54 #L157ess_vmL157esick="retineesn> 1157 < onclick="recommenaja * @len: size of area tolcopy to/fromalue="v2<.6.16.54 #L158ess_vmL158esick="retineesn> 1158 < onclick="recommenaja * @lvec: iovec array specifying where tolcopy to/from locallyalue="v2<.6.16.54 #L159ess_vmL159esick="retineesn> 1159 < onclick="recommenaja * @lvec_cnt: number of elemenas in iovec arrayalue="v2<.6.16.54 #L160ess_vmL160esick="retineesn> 116val < onclick="recommenaja * @lvec_current: index in iovec array we are up toalue="v2<.6.16.54 #L161ess_vmL161esick="retineesn> 1161 < onclick="recommenaja * @lvec_offset: offset in bytes from current iovec iov_base we are up toalue="v2<.6.16.54 #L162ess_vmL162esick="retineesn> 1162 < onclick="recommenaja * @ptio(thipages: struct pages area that cnclstore at leastalue="v2<.6.16.54 #L163ess_vmL163esick="retineesn> 1163 < onclick="recommenaja * nripages_to_copy struct page pointersalue="v2<.6.16.54 #L164ess_vmL164esick="retineesn> 1164 < onclick="recommenaja * @mm: mm vm_ taskalue="v2<.6.16.54 #L165ess_vmL165esick="retineesn> 1165 < onclick="recommenaja * @task: task tolread/wrime fromalue="v2<.6.16.54 #L166ess_vmL166esick="retineesn> 1166 < onclick="recommenaja * @v);wrime: 0 meanslcopy from, 1 meanslcopy toalue="v2<.6.16.54 #L167ess_vmL167esick="retineesn> 1167 < onclick="recommenaja * @bytes_copied: .27.53s number of bytes su> fully copiedalue="v2<.6.16.54 #L168ess_vmL168esick="retineesn> 1168 < onclick="recommenaja * R27.53s 0 on su> or o3" ilure errm_ codealue="v2<.6.16.54 #L169ess_vmL169esick="retineesn> 1169 < onclick="recommenaja */alue="v2<.6.16.54 #L170ess_vmL170esick="retineesn> 1170 <_searc intv2.6.16.54ptio(this);rw_single_vec <(unsigned long 2.6.16.54addr <,2<.6.16.54 #L171ess_vmL171esick="retineesn> 1171 < unsigned long 2.6.16.54l/s <,2<.6.16.54 #L172ess_vmL172esick="retineesn> 1172 < const struct 2.6.16.54iovec < *2.6.16.54lvec <,2<.6.16.54 #L173ess_vmL173esick="retineesn> 1173 < unsigned long 2.6.16.54lvec_cnt <,2<.6.16.54 #L174ess_vmL174esick="retineesn> 1174 < unsigned long *2.6.16.54lvec_current <,2<.6.16.54 #L175ess_vmL175esick="retineesn> 1175 < 2.6.16.54size_t < *2.6.16.54lvec_offset <,2<.6.16.54 #L176ess_vmL176esick="retineesn> 1176 < struct 2.6.16.54page < **2.6.16.54ptio(thipages <,2<.6.16.54 #L177ess_vmL177esick="retineesn> 1177 < struct 2.6.16.54mm_struct < *2.6.16.54mm <,2<.6.16.54 #L178ess_vmL178esick="retineesn> 1178 < struct 2.6.16.54task_struct < *2.6.16.54task <,2<.6.16.54 #L179ess_vmL179esick="retineesn> 1179 < intv2.6.16.54s);wrime <,2<.6.16.54 #L180ess_vmL180esick="retineesn> 1180 < 2.6.16.54ssize_t < *2.6.16.54bytes_copied <)2<.6.16.54 #L181ess_vmL181esick="retineesn> 1181 <{2<.6.16.54 #L182ess_vmL182esick="retineesn> 1182 < unsigned long 2.6.16.54pa < = 2.6.16.54addr < & 2.6.16.54PAGE_MASK <"2<.6.16.54 #L183ess_vmL183esick="retineesn> 1183 < unsigned long 2.6.16.54start_offset < = 2.6.16.54addr < - 2.6.16.54pa <"2<.6.16.54 #L184ess_vmL184esick="retineesn> 1184 < unsigned long 2.6.16.54nripages <"2<.6.16.54 #L185ess_vmL185esick="retineesn> 1185 < 2.6.16.54ssize_t < 2.6.16.54bytes_copied loop <"2<.6.16.54 #L186ess_vmL186esick="retineesn> 1186 < 2.6.16.54ssize_t < 2.6.16.54rc < = 0"2<.6.16.54 #L187ess_vmL187esick="retineesn> 1187 < unsigned long 2.6.16.54nripages_copied < = 0"2<.6.16.54 #L188ess_vmL188esick="retineesn> 1188 < unsigned long 2.6.16.54nripages_to_copy <"2<.6.16.54 #L189ess_vmL189esick="retineesn> 1189 < unsigned long 2.6.16.54maxipages_per loop < = 2.6.16.54PVM_MAX_KMALLOC_PAGES <2<.6.16.54 #L190ess_vmL190esick="retineesn> 1190 < / sizeof(struct 2.6.16.54pages < *)"2<.6.16.54 #L191ess_vmL191esick="retineesn> 1191 <2<.6.16.54 #L192ess_vmL192esick="retineesn> 1192 < *2.6.16.54bytes_copied < = 0"2<.6.16.54 #L193ess_vmL193esick="retineesn> 1193 <2<.6.16.54 #L194ess_vmL194esick="retineesn> 1194 < onclick="recommenaja/* Work out addr and page range required */alue="v2<.6.16.54 #L195ess_vmL195esick="retineesn> 1195 < if (2.6.16.54l/s < == 0)2<.6.16.54 #L196ess_vmL196esick="retineesn> 1196 < .27.53"0"2<.6.16.54 #L197ess_vmL197esick="retineesn> 1197 < 2.6.16.54nripages < = (2.6.16.54addr < + 2.6.16.54l/s < - 1) / 2.6.16.54PAGE_SIZE < - 2.6.16.54addr < / 2.6.16.54PAGE_SIZE < + 1"2<.6.16.54 #L198ess_vmL198esick="retineesn> 1198 <2<.6.16.54 #L199ess_vmL199esick="retineesn> 1199 < while ((2.6.16.54nripages_copied < < 2.6.16.54nripages <) && (*2.6.16.54lvec_current < < 2.6.16.54lvec_cnt <)) {2<.6.16.54 #L200ess_vmL200esick="retineesn> 1200 < 2.6.16.54nripages_to_copy < = 2.6.16.54min <(2.6.16.54nripages < - 2.6.16.54nripages_copied <,2<.6.16.54 #L201ess_vmL201esick="retineesn> 1201 < 2.6.16.54maxipages_per loop <)"2<.6.16.54 #L202ess_vmL202esick="retineesn> 1202 <2<.6.16.54 #L203ess_vmL203esick="retineesn> 1203 < 2.6.16.54rc < = 2.6.16.54ptio(this);rw_pages <(2.6.16.54task <, 2.6.16.54mm <, 2.6.16.54ptio(thipages <, 2.6.16.54pa <,2<.6.16.54 #L204ess_vmL204esick="retineesn> 1204 < 2.6.16.54start_offset <, 2.6.16.54l/s <,2<.6.16.54 #L205ess_vmL205esick="retineesn> 1205 < 2.6.16.54lvec <, 2.6.16.54lvec_cnt <,2<.6.16.54 #L206ess_vmL206esick="retineesn> 1206 < 2.6.16.54lvec_current <, 2.6.16.54lvec_offset <,2<.6.16.54 #L207ess_vmL207esick="retineesn> 1207 < 2.6.16.54s);wrime <, 2.6.16.54nripages_to_copy <,2<.6.16.54 #L208ess_vmL208esick="retineesn> 1208 < &2.6.16.54bytes_copied loop <)"2<.6.16.54 #L209ess_vmL209esick="retineesn> 1209 < 2.6.16.54start_offset < = 0"2<.6.16.54 #L210ess_vmL210esick="retineesn> 1210 < *2.6.16.54bytes_copied < += 2.6.16.54bytes_copied loop <"2<.6.16.54 #L211ess_vmL211esick="retineesn> 1211 <2<.6.16.54 #L212ess_vmL212esick="retineesn> 1212 < if (2.6.16.54rc < < 0) {2<.6.16.54 #L213ess_vmL213esick="retineesn> 1213 < .27.53"2.6.16.54rc <"2<.6.16.54 #L214ess_vmL214esick="retineesn> 1214 < } else {2<.6.16.54 #L215ess_vmL215esick="retineesn> 1215 < 2.6.16.54l/s < -= 2.6.16.54bytes_copied loop <"2<.6.16.54 #L216ess_vmL216esick="retineesn> 1216 < 2.6.16.54nripages_copied < += 2.6.16.54nripages_to_copy <"2<.6.16.54 #L217ess_vmL217esick="retineesn> 1217 < 2.6.16.54pa < += 2.6.16.54nripages_to_copy < * 2.6.16.54PAGE_SIZE <"2<.6.16.54 #L218ess_vmL218esick="retineesn> 1218 < }2<.6.16.54 #L219ess_vmL219esick="retineesn> 1219 < }2<.6.16.54 #L220ess_vmL220esick="retineesn> 1220 <2<.6.16.54 #L221ess_vmL221esick="retineesn> 1221 < .27.53"2.6.16.54rc <"2<.6.16.54 #L222ess_vmL222esick="retineesn> 1222 <}2<.6.16.54 #L223ess_vmL223esick="retineesn> 1223 <2<.6.16.54 #L224ess_vmL224esick="retineesn> 1224 < onclick="recommenaja/* Maximum number of enaries for ptio(th pages arrayalue="v2<.6.16.54 #L225ess_vmL225esick="retineesn> 1225 < onclick="recommenaja which lives on stack */alue="v2<.6.16.54 #L226ess_vmL226esick="retineesn> 1226 <#define 2.6.16.54PVM_MAX_PP_ARRAY_COUNT < 162<.6.16.54 #L227ess_vmL227esick="retineesn> 1227 <2<.6.16.54 #L228ess_vmL228esick="retineesn> 1228 < onclick="recommenaja/**alue="v2<.6.16.54 #L229ess_vmL229esick="retineesn> 1229 < onclick="recommenaja * ptio(this);rw_core - core of reading/wriming pages from task specifiedalue="v2<.6.16.54 #L230ess_vmL230esick="retineesn> 123val < onclick="recommenaja * @pid: PID of ptio(th tolread/wrime from/toalue="v2<.6.16.54 #L231ess_vmL231esick="retineesn> 1231 < onclick="recommenaja * @lvec: iovec array specifying where tolcopy to/from locallyalue="v2<.6.16.54 #L232ess_vmL232esick="retineesn> 1232 < onclick="recommenaja * @liovcnt: size of lvec arrayalue="v2<.6.16.54 #L233ess_vmL233esick="retineesn> 1233 < onclick="recommenaja * @rvec: iovec array specifying where tolcopy to/from in the other ptio(thalue="v2<.6.16.54 #L234ess_vmL234esick="retineesn> 1234 < onclick="recommenaja * @riovcnt: size of rvec arrayalue="v2<.6.16.54 #L235ess_vmL235esick="retineesn> 1235 < onclick="recommenaja * @flags: currently unusedalue="v2<.6.16.54 #L236ess_vmL236esick="retineesn> 1236 < onclick="recommenaja * @v);wrime: 0 if reading from other ptio(th, 1 if wriming tolother ptio(thalue="v2<.6.16.54 #L237ess_vmL237esick="retineesn> 1237 < onclick="recommenaja * R27.53s the number of bytes read/wrimten or errm_ code. Mayalue="v2<.6.16.54 #L238ess_vmL238esick="retineesn> 1238 < onclick="recommenaja * .27.53"l(th bytes thnclexpected if nclerrm_ occurs during the copyingalue="v2<.6.16.54 #L239ess_vmL239esick="retineesn> 1239 < onclick="recommenaja * ptio(th.alue="v2<.6.16.54 #L240ess_vmL240esick="retineesn> 124val < onclick="recommenaja */alue="v2<.6.16.54 #L241ess_vmL241esick="retineesn> 1241 <_searc 2.6.16.54ssize_t < 2.6.16.54ptio(this);rw_core <(2.6.16.54pid_t < 2.6.16.54pid <, const struct 2.6.16.54iovec < *2.6.16.54lvec <,2<.6.16.54 #L242ess_vmL242esick="retineesn> 1242 < unsigned long 2.6.16.54liovcnt <,2<.6.16.54 #L243ess_vmL243esick="retineesn> 1243 < const struct 2.6.16.54iovec < *2.6.16.54rvec <,2<.6.16.54 #L244ess_vmL244esick="retineesn> 1244 < unsigned long 2.6.16.54riovcnt <,2<.6.16.54 #L245ess_vmL245esick="retineesn> 1245 < unsigned long 2.6.16.54flags <, intv2.6.16.54s);wrime <)2<.6.16.54 #L246ess_vmL246esick="retineesn> 1246 <{2<.6.16.54 #L247ess_vmL247esick="retineesn> 1247 < struct 2.6.16.54task_struct < *2.6.16.54task <"2<.6.16.54 #L248ess_vmL248esick="retineesn> 1248 < struct 2.6.16.54page < *2.6.16.54pp_stack <[2.6.16.54PVM_MAX_PP_ARRAY_COUNT <]"2<.6.16.54 #L249ess_vmL249esick="retineesn> 1249 < struct 2.6.16.54page < **2.6.16.54ptio(thipages < = 2.6.16.54pp_stack <"2<.6.16.54 #L250ess_vmL250esick="retineesn> 1250 < struct 2.6.16.54mm_struct < *2.6.16.54mm <"2<.6.16.54 #L251ess_vmL251esick="retineesn> 1251 < unsigned long 2.6.16.54i <"2<.6.16.54 #L252ess_vmL252esick="retineesn> 1252 < 2.6.16.54ssize_t < 2.6.16.54rc < = 0"2<.6.16.54 #L253ess_vmL253esick="retineesn> 1253 < 2.6.16.54ssize_t < 2.6.16.54bytes_copied loop <"2<.6.16.54 #L254ess_vmL254esick="retineesn> 1254 < 2.6.16.54ssize_t < 2.6.16.54bytes_copied < = 0"2<.6.16.54 #L255ess_vmL255esick="retineesn> 1255 < unsigned long 2.6.16.54nripages < = 0"2<.6.16.54 #L256ess_vmL256esick="retineesn> 1256 < unsigned long 2.6.16.54nripages_iov <"2<.6.16.54 #L257ess_vmL257esick="retineesn> 1257 < unsigned long 2.6.16.54iov_l_curr_idx < = 0"2<.6.16.54 #L258ess_vmL258esick="retineesn> 1258 < 2.6.16.54size_t < 2.6.16.54iov_l_curr_offset < = 0"2<.6.16.54 #L259ess_vmL259esick="retineesn> 1259 < 2.6.16.54ssize_t < 2.6.16.54iov_l/s <"2<.6.16.54 #L260ess_vmL260esick="retineesn> 1260 <2<.6.16.54 #L261ess_vmL261esick="retineesn> 1261 < onclick="recommenaja/*alue="v2<.6.16.54 #L262ess_vmL262esick="retineesn> 1262 < onclick="recommenaja * Work out how many pages of struct pages we're going tolneedalue="v2<.6.16.54 #L263ess_vmL263esick="retineesn> 1263 < onclick="recommenaja * when evenaually calling las_useripages ue="v2<.6.16.54 #L264ess_vmL264esick="retineesn> 1264 < onclick="recommenaja */alue="v2<.6.16.54 #L265ess_vmL265esick="retineesn> 1265 < for (2.6.16.54i < = 0"v2.6.16.54i < < 2.6.16.54riovcnt <"v2.6.16.54i <++) {2<.6.16.54 #L266ess_vmL266esick="retineesn> 1266 < 2.6.16.54iov_l/s < = 2.6.16.54rvec <[2.6.16.54i <].2.6.16.54iov_l/s <"2<.6.16.54 #L267ess_vmL267esick="retineesn> 1267 < if (2.6.16.54iov_l/s < > 0) {2<.6.16.54 #L268ess_vmL268esick="retineesn> 1268 < 2.6.16.54nripages_iov < = ((unsigned long)2.6.16.54rvec <[2.6.16.54i <].2.6.16.54iov_base <2<.6.16.54 #L269ess_vmL269esick="retineesn> 1269 < + 2.6.16.54iov_l/s <)2<.6.16.54 #L270ess_vmL270esick="retineesn> 1270 < / 2.6.16.54PAGE_SIZE < - (unsigned long)2.6.16.54rvec <[2.6.16.54i <].2.6.16.54iov_base <2<.6.16.54 #L271ess_vmL271esick="retineesn> 1271 < / 2.6.16.54PAGE_SIZE < + 1"2<.6.16.54 #L272ess_vmL272esick="retineesn> 1272 < 2.6.16.54nripages < = 2.6.16.54max <(2.6.16.54nripages <, 2.6.16.54nripages_iov <)"2<.6.16.54 #L273ess_vmL273esick="retineesn> 1273 < }2<.6.16.54 #L274ess_vmL274esick="retineesn> 1274 < }2<.6.16.54 #L275ess_vmL275esick="retineesn> 1275 <2<.6.16.54 #L276ess_vmL276esick="retineesn> 1276 < if (2.6.16.54nripages < == 0)2<.6.16.54 #L277ess_vmL277esick="retineesn> 1277 < .27.53"0"2<.6.16.54 #L278ess_vmL278esick="retineesn> 1278 <2<.6.16.54 #L279ess_vmL279esick="retineesn> 1279 < if (2.6.16.54nripages < > 2.6.16.54PVM_MAX_PP_ARRAY_COUNT <) {2<.6.16.54 #L280ess_vmL280esick="retineesn> 1280 < onclick="recommenaja/* For reliability don't try to kmalloc more thncalue="v2<.6.16.54 #L281ess_vmL281esick="retineesn> 1281 < onclick="recommenaja 2 pages worth */alue="v2<.6.16.54 #L282ess_vmL282esick="retineesn> 1282 < 2.6.16.54ptio(thipages < = 2.6.16.54kmalloc <(2.6.16.54min_t <(2.6.16.54size_t <, 2.6.16.54PVM_MAX_KMALLOC_PAGES <,2<.6.16.54 #L283ess_vmL283esick="retineesn> 1283 < sizeof(struct 2.6.16.54pages < *)*2.6.16.54nripages <),2<.6.16.54 #L284ess_vmL284esick="retineesn> 1284 < 2.6.16.54GFP_KERNEL <)"2<.6.16.54 #L285ess_vmL285esick="retineesn> 1285 <2<.6.16.54 #L286ess_vmL286esick="retineesn> 1286 < if (!2.6.16.54ptio(thipages <)2<.6.16.54 #L287ess_vmL287esick="retineesn> 1287 < .27.53"-2.6.16.54ENOMEM <"2<.6.16.54 #L288ess_vmL288esick="retineesn> 1288 < }2<.6.16.54 #L289ess_vmL289esick="retineesn> 1289 <2<.6.16.54 #L290ess_vmL290esick="retineesn> 1290 < onclick="recommenaja/* Gas ptio(th information */alue="v2<.6.16.54 #L291ess_vmL291esick="retineesn> 1291 < .6.16.54rcu_read_lock <()"2<.6.16.54 #L292ess_vmL292esick="retineesn> 1292 < 2.6.16.54task < = 2.6.16.54find_task_by_vpid <(2.6.16.54pid <)"2<.6.16.54 #L293ess_vmL293esick="retineesn> 1293 < if (2.6.16.54task <)2<.6.16.54 #L294ess_vmL294esick="retineesn> 1294 < 2.6.16.54las_task_struct <(2.6.16.54task <)"2<.6.16.54 #L295ess_vmL295esick="retineesn> 1295 < 2.6.16.54rcu_read_unlock <()"2<.6.16.54 #L296ess_vmL296esick="retineesn> 1296 < if (!2.6.16.54task <) {2<.6.16.54 #L297ess_vmL297esick="retineesn> 1297 < 2.6.16.54rc < = -2.6.16.54ESRCH <"2<.6.16.54 #L298ess_vmL298esick="retineesn> 1298 < goto 2.6.16.54free_ptioipages <"2<.6.16.54 #L299ess_vmL299esick="retineesn> 1299 < }2<.6.16.54 #L300ess_vmL300esick="retineesn> 1300 <2<.6.16.54 #L301ess_vmL301esick="retineesn> 1301 < .6.16.54mm < = 2.6.16.54 "lick="re_ref">mm_"> <(2.6.16.54task <, 2.6.16.54PTRACE_MODE_ATTACH <)"2<.6.16.54 #L302ess_vmL302esick="retineesn> 1302 < if (!2.6.16.54mm < || 2.6.16.54IS_ERR <(2.6.16.54mm <)) {2<.6.16.54 #L303ess_vmL303esick="retineesn> 1303 < 2.6.16.54rc < = 2.6.16.54IS_ERR <(2.6.16.54mm <) ? 2.6.16.54PTR_ERR <(2.6.16.54mm <) : -2.6.16.54ESRCH <"2<.6.16.54 #L304ess_vmL304esick="retineesn> 1304 < onclick="recommenaja/*alue="v2<.6.16.54 #L305ess_vmL305esick="retineesn> 1305 < onclick="recommenaja * Explicitly map EACCES to EPERM as EPERM is a more aalue="v2<.6.16.54 #L306ess_vmL306esick="retineesn> 1306 < onclick="recommenaja * apptipriate errm_ code for ptio(th_vw_readv/wrimevalue="v2<.6.16.54 #L307ess_vmL307esick="retineesn> 1307 < onclick="recommenaja */alue="v2<.6.16.54 #L308ess_vmL308esick="retineesn> 1308 < if (2.6.16.54rc < == -2.6.16.54EACCES <)2<.6.16.54 #L309ess_vmL309esick="retineesn> 1309 < 2.6.16.54rc < = -2.6.16.54EPERM <"2<.6.16.54 #L310ess_vmL310esick="retineesn> 1310 < goto 2.6.16.54putitask_struct <"2<.6.16.54 #L311ess_vmL311esick="retineesn> 1311 < }2<.6.16.54 #L312ess_vmL312esick="retineesn> 1312 <2<.6.16.54 #L313ess_vmL313esick="retineesn> 1313 < for (2.6.16.54i < = 0"v2.6.16.54i < < 2.6.16.54riovcnt < && 2.6.16.54iov_l_curr_idx < < 2.6.16.54liovcnt <"v2.6.16.54i <++) {2<.6.16.54 #L314ess_vmL314esick="retineesn> 1314 < 2.6.16.54rc < = 2.6.16.54ptio(this);rw_single_vec <(2<.6.16.54 #L315ess_vmL315esick="retineesn> 1315 < (unsigned long)2.6.16.54rvec <[2.6.16.54i <].2.6.16.54iov_base <, 2.6.16.54rvec <[2.6.16.54i <].2.6.16.54iov_l/s <,2<.6.16.54 #L316ess_vmL316esick="retineesn> 1316 < 2.6.16.54lvec <, 2.6.16.54liovcnt <, &2.6.16.54iov_l_curr_idx <, &2.6.16.54iov_l_curr_offset <,2<.6.16.54 #L317ess_vmL317esick="retineesn> 1317 < 2.6.16.54ptio(thipages <, 2.6.16.54mm <, 2.6.16.54task <, 2.6.16.54s);wrime <, &2.6.16.54bytes_copied loop <)"2<.6.16.54 #L318ess_vmL318esick="retineesn> 1318 < 2.6.16.54bytes_copied < += 2.6.16.54bytes_copied loop <"2<.6.16.54 #L319ess_vmL319esick="retineesn> 1319 < if (2.6.16.54rc < != 0) {2<.6.16.54 #L320ess_vmL320esick="retineesn> 1320 < onclick="recommenaja/* If we have managed tolcopy any data at all thecalue="v2<.6.16.54 #L321ess_vmL321esick="retineesn> 1321 < onclick="recommenaja we .27.53"the number of bytes copied. Otherwisealue="v2<.6.16.54 #L322ess_vmL322esick="retineesn> 1322 < onclick="recommenaja we .27.53"the errm_ code */alue="v2<.6.16.54 #L323ess_vmL323esick="retineesn> 1323 < if (2.6.16.54bytes_copied <)2<.6.16.54 #L324ess_vmL324esick="retineesn> 1324 < 2.6.16.54rc < = 2.6.16.54bytes_copied <"2<.6.16.54 #L325ess_vmL325esick="retineesn> 1325 < goto 2.6.16.54putimm <"2<.6.16.54 #L326ess_vmL326esick="retineesn> 1326 < }2<.6.16.54 #L327ess_vmL327esick="retineesn> 1327 < }2<.6.16.54 #L328ess_vmL328esick="retineesn> 1328 <2<.6.16.54 #L329ess_vmL329esick="retineesn> 1329 < 2.6.16.54rc < = 2.6.16.54bytes_copied <"2<.6.16.54 #L330ess_vmL330esick="retineesn> 133val < .6.16.54putimm <:2<.6.16.54 #L331ess_vmL331esick="retineesn> 1331 < .6.16.54mmput <(2.6.16.54mm <)"2<.6.16.54 #L332ess_vmL332esick="retineesn> 1332 <2<.6.16.54 #L333ess_vmL333esick="retineesn> 1333 < .6.16.54putitask_struct <:2<.6.16.54 #L334ess_vmL334esick="retineesn> 1334 < 2.6.16.54putitask_struct <(2.6.16.54task <)"2<.6.16.54 #L335ess_vmL335esick="retineesn> 1335 <2<.6.16.54 #L336ess_vmL336esick="retineesn> 1336 < .6.16.54free_ptioipages <:2<.6.16.54 #L337ess_vmL337esick="retineesn> 1337 < if (2.6.16.54ptio(thipages < != 2.6.16.54pp_stack <)2<.6.16.54 #L338ess_vmL338esick="retineesn> 1338 < 2.6.16.54kfree <(2.6.16.54ptio(thipages <)"2<.6.16.54 #L339ess_vmL339esick="retineesn> 1339 < .27.53"2.6.16.54rc <"2<.6.16.54 #L340ess_vmL340esick="retineesn> 134val <}2<.6.16.54 #L341ess_vmL341esick="retineesn> 1341 <2<.6.16.54 #L342ess_vmL342esick="retineesn> 1342 < onclick="recommenaja/**alue="v2<.6.16.54 #L343ess_vmL343esick="retineesn> 1343 < onclick="recommenaja * ptio(this);rw - check iovecs before calling core routinealue="v2<.6.16.54 #L344ess_vmL344esick="retineesn> 1344 < onclick="recommenaja * @pid: PID of ptio(th tolread/wrime from/toalue="v2<.6.16.54 #L345ess_vmL345esick="retineesn> 1345 < onclick="recommenaja * @lvec: iovec array specifying where tolcopy to/from locallyalue="v2<.6.16.54 #L346ess_vmL346esick="retineesn> 1346 < onclick="recommenaja * @liovcnt: size of lvec arrayalue="v2<.6.16.54 #L347ess_vmL347esick="retineesn> 1347 < onclick="recommenaja * @rvec: iovec array specifying where tolcopy to/from in the other ptio(thalue="v2<.6.16.54 #L348ess_vmL348esick="retineesn> 1348 < onclick="recommenaja * @riovcnt: size of rvec arrayalue="v2<.6.16.54 #L349ess_vmL349esick="retineesn> 1349 < onclick="recommenaja * @flags: currently unusedalue="v2<.6.16.54 #L350ess_vmL350esick="retineesn> 135val < onclick="recommenaja * @v);wrime: 0 if reading from other ptio(th, 1 if wriming tolother ptio(thalue="v2<.6.16.54 #L351ess_vmL351esick="retineesn> 1351 < onclick="recommenaja * R27.53s the number of bytes read/wrimten or errm_ code. Mayalue="v2<.6.16.54 #L352ess_vmL352esick="retineesn> 1352 < onclick="recommenaja * .27.53"l(th bytes thnclexpected if nclerrm_ occurs during the copyingalue="v2<.6.16.54 #L353ess_vmL353esick="retineesn> 1353 < onclick="recommenaja * ptio(th.alue="v2<.6.16.54 #L354ess_vmL354esick="retineesn> 1354 < onclick="recommenaja */alue="v2<.6.16.54 #L355ess_vmL355esick="retineesn> 1355 <_searc 2.6.16.54ssize_t < 2.6.16.54ptio(this);rw <(2.6.16.54pid_t < 2.6.16.54pid <,2<.6.16.54 #L356ess_vmL356esick="retineesn> 1356 < const struct 2.6.16.54iovec < 2.6.16.54__user < *2.6.16.54lvec <,2<.6.16.54 #L357ess_vmL357esick="retineesn> 1357 < unsigned long 2.6.16.54liovcnt <,2<.6.16.54 #L358ess_vmL358esick="retineesn> 1358 < const struct 2.6.16.54iovec < 2.6.16.54__user < *2.6.16.54rvec <,2<.6.16.54 #L359ess_vmL359esick="retineesn> 1359 < unsigned long 2.6.16.54riovcnt <,2<.6.16.54 #L360ess_vmL360esick="retineesn> 1360 < unsigned long 2.6.16.54flags <, intv2.6.16.54s);wrime <)2<.6.16.54 #L361ess_vmL361esick="retineesn> 1361 <{2<.6.16.54 #L362ess_vmL362esick="retineesn> 1362 < struct 2.6.16.54iovec < 2.6.16.54iovstack_l <[2.6.16.54UIO_FASTIOV <]"2<.6.16.54 #L363ess_vmL363esick="retineesn> 1363 < struct 2.6.16.54iovec < 2.6.16.54iovstack_r <[2.6.16.54UIO_FASTIOV <]"2<.6.16.54 #L364ess_vmL364esick="retineesn> 1364 < struct 2.6.16.54iovec < *2.6.16.54iov_l < = 2.6.16.54iovstack_l <"2<.6.16.54 #L365ess_vmL365esick="retineesn> 1365 < struct 2.6.16.54iovec < *2.6.16.54iov_r < = 2.6.16.54iovstack_r <"2<.6.16.54 #L366ess_vmL366esick="retineesn> 1366 < 2.6.16.54ssize_t < 2.6.16.54rc <"2<.6.16.54 #L367ess_vmL367esick="retineesn> 1367 <2<.6.16.54 #L368ess_vmL368esick="retineesn> 1368 < if (2.6.16.54flags < != 0)2<.6.16.54 #L369ess_vmL369esick="retineesn> 1369 < .27.53"-2.6.16.54EINVAL <"2<.6.16.54 #L370ess_vmL370esick="retineesn> 1370 <2<.6.16.54 #L371ess_vmL371esick="retineesn> 1371 < onclick="recommenaja/* Check iovecs */alue="v2<.6.16.54 #L372ess_vmL372esick="retineesn> 1372 < if (2.6.16.54s);wrime <)2<.6.16.54 #L373ess_vmL373esick="retineesn> 1373 < 2.6.16.54rc < = 2.6.16.54rw_copy_check_uvector <(2.6.16.54WRITE <, 2.6.16.54lvec <, 2.6.16.54liovcnt <, 2.6.16.54UIO_FASTIOV <,2<.6.16.54 #L374ess_vmL374esick="retineesn> 1374 < 2.6.16.54iovstack_l <, &2.6.16.54iov_l <)"2<.6.16.54 #L375ess_vmL375esick="retineesn> 1375 < else2<.6.16.54 #L376ess_vmL376esick="retineesn> 1376 < 2.6.16.54rc < = 2.6.16.54rw_copy_check_uvector <(2.6.16.54READ <, 2.6.16.54lvec <, 2.6.16.54liovcnt <, 2.6.16.54UIO_FASTIOV <,2<.6.16.54 #L377ess_vmL377esick="retineesn> 1377 < 2.6.16.54iovstack_l <, &2.6.16.54iov_l <)"2<.6.16.54 #L378ess_vmL378esick="retineesn> 1378 < if (2.6.16.54rc < <= 0)2<.6.16.54 #L379ess_vmL379esick="retineesn> 1379 < goto 2.6.16.54free_iovecs <"2<.6.16.54 #L380ess_vmL380esick="retineesn> 1380 <2<.6.16.54 #L381ess_vmL381esick="retineesn> 1381 < .6.16.54rc < = 2.6.16.54rw_copy_check_uvector <(2.6.16.54CHECK_IOVEC_ONLY <, 2.6.16.54rvec <, 2.6.16.54riovcnt <, 2.6.16.54UIO_FASTIOV <,2<.6.16.54 #L382ess_vmL382esick="retineesn> 1382 < 2.6.16.54iovstack_r <, &2.6.16.54iov_r <)"2<.6.16.54 #L383ess_vmL383esick="retineesn> 1383 < if (2.6.16.54rc < <= 0)2<.6.16.54 #L384ess_vmL384esick="retineesn> 1384 < goto 2.6.16.54free_iovecs <"2<.6.16.54 #L385ess_vmL385esick="retineesn> 1385 <2<.6.16.54 #L386ess_vmL386esick="retineesn> 1386 < 2.6.16.54rc < = 2.6.16.54ptio(this);rw_core <(2.6.16.54pid <, 2.6.16.54iov_l <, 2.6.16.54liovcnt <, 2.6.16.54iov_r <, 2.6.16.54riovcnt <, 2.6.16.54flags <,2<.6.16.54 #L387ess_vmL387esick="retineesn> 1387 < 2.6.16.54s);wrime <)"2<.6.16.54 #L388ess_vmL388esick="retineesn> 1388 <2<.6.16.54 #L389ess_vmL389esick="retineesn> 1389 <2.6.16.54free_iovecs <:2<.6.16.54 #L390ess_vmL390esick="retineesn> 1390 < if (2.6.16.54iov_r < != 2.6.16.54iovstack_r <)2<.6.16.54 #L391ess_vmL391esick="retineesn> 1391 < 2.6.16.54kfree <(2.6.16.54iov_r <)"2<.6.16.54 #L392ess_vmL392esick="retineesn> 1392 < if (2.6.16.54iov_l < != 2.6.16.54iovstack_l <)2<.6.16.54 #L393ess_vmL393esick="retineesn> 1393 < 2.6.16.54kfree <(2.6.16.54iov_l <)"2<.6.16.54 #L394ess_vmL394esick="retineesn> 1394 <2<.6.16.54 #L395ess_vmL395esick="retineesn> 1395 < .27.53"2.6.16.54rc <"2<.6.16.54 #L396ess_vmL396esick="retineesn> 1396 <}2<.6.16.54 #L397ess_vmL397esick="retineesn> 1397 <2<.6.16.54 #L398ess_vmL398esick="retineesn> 1398 <2.6.16.54SYSCALL_DEFINE6 <(2.6.16.54ptio(this);readv <, 2.6.16.54pid_t <, 2.6.16.54pid <, const struct 2.6.16.54iovec < 2.6.16.54__user < *, 2.6.16.54lvec <,2<.6.16.54 #L399ess_vmL399esick="retineesn> 1399 < unsigned long, 2.6.16.54liovcnt <, const struct 2.6.16.54iovec < 2.6.16.54__user < *, 2.6.16.54rvec <,2<.6.16.54 #L400ess_vmL400esick="retineesn> 1400 < unsigned long, 2.6.16.54riovcnt <, unsigned long, 2.6.16.54flags <)2<.6.16.54 #L401ess_vmL401esick="retineesn> 1401 <{2<.6.16.54 #L402ess_vmL402esick="retineesn> 1402 < .27.53"2.6.16.54ptio(this);rw <(2.6.16.54pid <, 2.6.16.54lvec <, 2.6.16.54liovcnt <, 2.6.16.54rvec <, 2.6.16.54riovcnt <, 2.6.16.54flags <, 0)"2<.6.16.54 #L403ess_vmL403esick="retineesn> 1403 <}2<.6.16.54 #L404ess_vmL404esick="retineesn> 1404 <2<.6.16.54 #L405ess_vmL405esick="retineesn> 1405 < .6.16.54SYSCALL_DEFINE6 <(2.6.16.54ptio(this);wrimeval <, 2.6.16.54pid_t <, 2.6.16.54pid <,2<.6.16.54 #L406ess_vmL406esick="retineesn> 1406 < const struct 2.6.16.54iovec < 2.6.16.54__user < *, 2.6.16.54lvec <,2<.6.16.54 #L407ess_vmL407esick="retineesn> 1407 < unsigned long, 2.6.16.54liovcnt <, const struct 2.6.16.54iovec < 2.6.16.54__user < *, 2.6.16.54rvec <,2<.6.16.54 #L408ess_vmL408esick="retineesn> 1408 < unsigned long, 2.6.16.54riovcnt <, unsigned long, 2.6.16.54flags <)2<.6.16.54 #L409ess_vmL409esick="retineesn> 1409 <{2<.6.16.54 #L410ess_vmL410esick="retineesn> 1410 < .27.53"2.6.16.54ptio(this);rw <(2.6.16.54pid <, 2.6.16.54lvec <, 2.6.16.54liovcnt <, 2.6.16.54rvec <, 2.6.16.54riovcnt <, 2.6.16.54flags <, 1)"2<.6.16.54 #L411ess_vmL411esick="retineesn> 1411 <}2<.6.16.54 #L412ess_vmL412esick="retineesn> 1412 <2<.6.16.54 #L413ess_vmL413esick="retineesn> 1413 <#ifdef 2.6.16.54CONFIG_COMPAT <2<.6.16.54 #L414ess_vmL414esick="retineesn> 1414 <2<.6.16.54 #L415ess_vmL415esick="retineesn> 1415 < .6.16.54asmtinkage < 2.6.16.54ssize_t <2<.6.16.54 #L416ess_vmL416esick="retineesn> 1416 < .6.16.54compat_ptio(this);rw <(2.6.16.54compat_pid_t < 2.6.16.54pid <,2<.6.16.54 #L417ess_vmL417esick="retineesn> 1417 < const struct 2.6.16.54compat_iovec < 2.6.16.54__user < *2.6.16.54lvec <,2<.6.16.54 #L418ess_vmL418esick="retineesn> 1418 < unsigned long 2.6.16.54liovcnt <,2<.6.16.54 #L419ess_vmL419esick="retineesn> 1419 < const struct 2.6.16.54compat_iovec < 2.6.16.54__user < *2.6.16.54rvec <,2<.6.16.54 #L420ess_vmL420esick="retineesn> 1420 < unsigned long 2.6.16.54riovcnt <,2<.6.16.54 #L421ess_vmL421esick="retineesn> 1421 < unsigned long 2.6.16.54flags <, intv2.6.16.54s);wrime <)2<.6.16.54 #L422ess_vmL422esick="retineesn> 1422 <{2<.6.16.54 #L423ess_vmL423esick="retineesn> 1423 < struct 2.6.16.54iovec < 2.6.16.54iovstack_l <[2.6.16.54UIO_FASTIOV <]"2<.6.16.54 #L424ess_vmL424esick="retineesn> 1424 < struct 2.6.16.54iovec < 2.6.16.54iovstack_r <[2.6.16.54UIO_FASTIOV <]"2<.6.16.54 #L425ess_vmL425esick="retineesn> 1425 < struct 2.6.16.54iovec < *2.6.16.54iov_l < = 2.6.16.54iovstack_l <"2<.6.16.54 #L426ess_vmL426esick="retineesn> 1426 < struct 2.6.16.54iovec < *2.6.16.54iov_r < = 2.6.16.54iovstack_r <"2<.6.16.54 #L427ess_vmL427esick="retineesn> 1427 < 2.6.16.54ssize_t < 2.6.16.54rc < = -2.6.16.54EFAULT <"2<.6.16.54 #L428ess_vmL428esick="retineesn> 1428 <2<.6.16.54 #L429ess_vmL429esick="retineesn> 1429 < if (2.6.16.54flags < != 0)2<.6.16.54 #L430ess_vmL430esick="retineesn> 1430 < .27.53"-2.6.16.54EINVAL <"2<.6.16.54 #L431ess_vmL431esick="retineesn> 1431 <2<.6.16.54 #L432ess_vmL432esick="retineesn> 1432 < if (!2.6.16.54 _ok"lick="re_ref">"> _ok <(2.6.16.54VERIFY_READ <, 2.6.16.54lvec <, 2.6.16.54liovcnt < * sizeof(*2.6.16.54lvec <)))2<.6.16.54 #L433ess_vmL433esick="retineesn> 1433 < goto 2.6.16.54out <"2<.6.16.54 #L434ess_vmL434esick="retineesn> 1434 <2<.6.16.54 #L435ess_vmL435esick="retineesn> 1435 < if (!2.6.16.54 _ok"lick="re_ref">"> _ok <(2.6.16.54VERIFY_READ <, 2.6.16.54rvec <, 2.6.16.54riovcnt < * sizeof(*2.6.16.54rvec <)))2<.6.16.54 #L436ess_vmL436esick="retineesn> 1436 < goto 2.6.16.54out <"2<.6.16.54 #L437ess_vmL437esick="retineesn> 1437 <2<.6.16.54 #L438ess_vmL438esick="retineesn> 1438 < if (2.6.16.54s);wrime <)2<.6.16.54 #L439ess_vmL439esick="retineesn> 1439 < 2.6.16.54rc < = 2.6.16.54compat_rw_copy_check_uvector <(2.6.16.54WRITE <, 2.6.16.54lvec <, 2.6.16.54liovcnt <,2<.6.16.54 #L440ess_vmL440esick="retineesn> 1440 < 2.6.16.54UIO_FASTIOV <, 2.6.16.54iovstack_l <,2<.6.16.54 #L441ess_vmL441esick="retineesn> 1441 < &2.6.16.54iov_l <)"2<.6.16.54 #L442ess_vmL442esick="retineesn> 1442 < else2<.6.16.54 #L443ess_vmL443esick="retineesn> 1443 < 2.6.16.54rc < = 2.6.16.54compat_rw_copy_check_uvector <(2.6.16.54READ <, 2.6.16.54lvec <, 2.6.16.54liovcnt <,2<.6.16.54 #L444ess_vmL444esick="retineesn> 1444 < 2.6.16.54UIO_FASTIOV <, 2.6.16.54iovstack_l <,2<.6.16.54 #L445ess_vmL445esick="retineesn> 1445 < &2.6.16.54iov_l <)"2<.6.16.54 #L446ess_vmL446esick="retineesn> 1446 < if (2.6.16.54rc < <= 0)2<.6.16.54 #L447ess_vmL447esick="retineesn> 1447 < goto 2.6.16.54free_iovecs <"2<.6.16.54 #L448ess_vmL448esick="retineesn> 1448 < 2.6.16.54rc < = 2.6.16.54compat_rw_copy_check_uvector <(2.6.16.54CHECK_IOVEC_ONLY <, 2.6.16.54rvec <, 2.6.16.54riovcnt <,2<.6.16.54 #L449ess_vmL449esick="retineesn> 1449 < 2.6.16.54UIO_FASTIOV <, 2.6.16.54iovstack_r <,2<.6.16.54 #L450ess_vmL450esick="retineesn> 1450 < &2.6.16.54iov_r <)"2<.6.16.54 #L451ess_vmL451esick="retineesn> 1451 < if (2.6.16.54rc < <= 0)2<.6.16.54 #L452ess_vmL452esick="retineesn> 1452 < goto 2.6.16.54free_iovecs <"2<.6.16.54 #L453ess_vmL453esick="retineesn> 1453 <2<.6.16.54 #L454ess_vmL454esick="retineesn> 1454 < 2.6.16.54rc < = 2.6.16.54ptio(this);rw_core <(2.6.16.54pid <, 2.6.16.54iov_l <, 2.6.16.54liovcnt <, 2.6.16.54iov_r <, 2.6.16.54riovcnt <, 2.6.16.54flags <,2<.6.16.54 #L455ess_vmL455esick="retineesn> 1455 < 2.6.16.54s);wrime <)"2<.6.16.54 #L456ess_vmL456esick="retineesn> 1456 <2<.6.16.54 #L457ess_vmL457esick="retineesn> 1457 <2.6.16.54free_iovecs <:2<.6.16.54 #L458ess_vmL458esick="retineesn> 1458 < if (2.6.16.54iov_r < != 2.6.16.54iovstack_r <)2<.6.16.54 #L459ess_vmL459esick="retineesn> 1459 < 2.6.16.54kfree <(2.6.16.54iov_r <)"2<.6.16.54 #L460ess_vmL460esick="retineesn> 1460 < if (2.6.16.54iov_l < != 2.6.16.54iovstack_l <)2<.6.16.54 #L461ess_vmL461esick="retineesn> 1461 < 2.6.16.54kfree <(2.6.16.54iov_l <)"2<.6.16.54 #L462ess_vmL462esick="retineesn> 1462 <2<.6.16.54 #L463ess_vmL463esick="retineesn> 1463 < .6.16.54out <:2<.6.16.54 #L464ess_vmL464esick="retineesn> 1464 < .27.53"2.6.16.54rc <"2<.6.16.54 #L465ess_vmL465esick="retineesn> 1465 <}2<.6.16.54 #L466ess_vmL466esick="retineesn> 1466 <2<.6.16.54 #L467ess_vmL467esick="retineesn> 1467 <2.6.16.54asmtinkage < 2.6.16.54ssize_t <2<.6.16.54 #L468ess_vmL468esick="retineesn> 1468 <2.6.16.54compat_sys_ptio(this);readv <(2.6.16.54compat_pid_t < 2.6.16.54pid <,2<.6.16.54 #L469ess_vmL469esick="retineesn> 1469 < const struct 2.6.16.54compat_iovec < 2.6.16.54__user < *2.6.16.54lvec <,2<.6.16.54 #L470ess_vmL470esick="retineesn> 1470 < unsigned long 2.6.16.54liovcnt <,2<.6.16.54 #L471ess_vmL471esick="retineesn> 1471 < const struct 2.6.16.54compat_iovec < 2.6.16.54__user < *2.6.16.54rvec <,2<.6.16.54 #L472ess_vmL472esick="retineesn> 1472 < unsigned long 2.6.16.54riovcnt <,2<.6.16.54 #L473ess_vmL473esick="retineesn> 1473 < unsigned long 2.6.16.54flags <)2<.6.16.54 #L474ess_vmL474esick="retineesn> 1474 <{2<.6.16.54 #L475ess_vmL475esick="retineesn> 1475 < .27.53"2.6.16.54compat_ptio(this);rw <(2.6.16.54pid <, 2.6.16.54lvec <, 2.6.16.54liovcnt <, 2.6.16.54rvec <,2<.6.16.54 #L476ess_vmL476esick="retineesn> 1476 < 2.6.16.54riovcnt <, 2.6.16.54flags <, 0)"2<.6.16.54 #L477ess_vmL477esick="retineesn> 1477 <}2<.6.16.54 #L478ess_vmL478esick="retineesn> 1478 <2<.6.16.54 #L479ess_vmL479esick="retineesn> 1479 <2.6.16.54asmtinkage < 2.6.16.54ssize_t <2<.6.16.54 #L480ess_vmL480esick="retineesn> 148val < .6.16.54compat_sys_ptio(this);wrimev <(2.6.16.54compat_pid_t < 2.6.16.54pid <,2<.6.16.54 #L481ess_vmL481esick="retineesn> 1481 < const struct 2.6.16.54compat_iovec < 2.6.16.54__user < *2.6.16.54lvec <,2<.6.16.54 #L482ess_vmL482esick="retineesn> 1482 < unsigned long 2.6.16.54liovcnt <,2<.6.16.54 #L483ess_vmL483esick="retineesn> 1483 < const struct 2.6.16.54compat_iovec < 2.6.16.54__user < *2.6.16.54rvec <,2<.6.16.54 #L484ess_vmL484esick="retineesn> 1484 < unsigned long 2.6.16.54riovcnt <,2<.6.16.54 #L485ess_vmL485esick="retineesn> 1485 < unsigned long 2.6.16.54flags <)2<.6.16.54 #L486ess_vmL486esick="retineesn> 1486 <{2<.6.16.54 #L487ess_vmL487esick="retineesn> 1487 < .27.53"2.6.16.54compat_ptio(this);rw <(2.6.16.54pid <, 2.6.16.54lvec <, 2.6.16.54liovcnt <, 2.6.16.54rvec <,2<.6.16.54 #L488ess_vmL488esick="retineesn> 1488 < 2.6.16.54riovcnt <, 2.6.16.54flags <, 1)"2<.6.16.54 #L489ess_vmL489esick="retineesn> 1489 <}2<.6.16.54 #L490ess_vmL490esick="retineesn> 1490 <2<.6.16.54 #L491ess_vmL491esick="retineesn> 1491 <#endif2<.6.16.54 #L492ess_vmL492esick="retineesn> 1492 < The original LXR software by the <.6.16.54http://sourceforge.netoptijects/lxrp>LXR community <, thislexperimenaal version by <.6.16.54 ailto:lxr@tinux.no">lxr@tinux.no <. lxr.tinux.no kindly hosted by <.6.16.54http://www.redpill-tinpti.no">Redpill Linpti AS <, ptivider of Linux consulming and operations servi since 1995.