提交 73b109d1 编写于 作者: O openharmony_ci 提交者: Gitee

!18 pagecache优化需求回合到LTS 3.0分支

Merge pull request !18 from LeonChan/pg3
......@@ -272,8 +272,8 @@ static int TeeCalcTaskSoHash(unsigned char *digest, uint32_t digLen,
if (!LOS_IsRegionFileValid(region)) {
continue;
}
struct file *fileRegion = region->unTypeData.rf.file;
if (fileRegion != NULL && !strncmp(fileRegion->f_path, LIBTEEC_SO, strlen(LIBTEEC_SO))) {
struct Vnode *vnode = region->unTypeData.rf.vnode;
if (vnode != NULL && !strncmp(vnode->filePath, LIBTEEC_SO, strlen(LIBTEEC_SO))) {
TeeSha256Update(&ctx, (void *)region->range.base, region->range.size);
findFlag = 1;
break;
......
......@@ -544,8 +544,8 @@ char *GetProcessPath(LosTaskCB *task, char *tpath, int pathLen)
return NULL;
}
struct file *fp = OS_PCB_FROM_PID(task->processID)->execFile;
if (fp == NULL) {
struct Vnode *vnode = OS_PCB_FROM_PID(task->processID)->execVnode;
if (vnode == NULL) {
return NULL;
}
int ret = memset_s(tpath, pathLen, '\0', pathLen);
......@@ -554,7 +554,7 @@ char *GetProcessPath(LosTaskCB *task, char *tpath, int pathLen)
return NULL;
}
ret = memcpy_s(tpath, pathLen - 1, fp->f_path, strlen(fp->f_path));
ret = memcpy_s(tpath, pathLen - 1, vnode->filePath, strlen(vnode->filePath));
if (ret != EOK) {
tloge("memcpy error ret is %d\n", ret);
return NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册