{"comment":{"url":"https://api.github.com/repos/m943040028/optee_os/comments/11859088","html_url":"https://github.com/m943040028/optee_os/commit/3231a9d0819340afeec4d7d106682996e94726db#commitcomment-11859088","id":11859088,"user":{"login":"m943040028","id":470954,"avatar_url":"https://avatars.githubusercontent.com/u/470954?v=3","gravatar_id":"","url":"https://api.github.com/users/m943040028","html_url":"https://github.com/m943040028","followers_url":"https://api.github.com/users/m943040028/followers","following_url":"https://api.github.com/users/m943040028/following{/other_user}","gists_url":"https://api.github.com/users/m943040028/gists{/gist_id}","starred_url":"https://api.github.com/users/m943040028/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m943040028/subscriptions","organizations_url":"https://api.github.com/users/m943040028/orgs","repos_url":"https://api.github.com/users/m943040028/repos","events_url":"https://api.github.com/users/m943040028/events{/privacy}","received_events_url":"https://api.github.com/users/m943040028/received_events","type":"User","site_admin":false},"position":8,"line":40,"path":"core/include/tee/tee_fs.h","commit_id":"3231a9d0819340afeec4d7d106682996e94726db","created_at":"2015-06-25T11:29:19Z","updated_at":"2015-06-25T11:29:19Z","body":"Guessing you mean having multiple REE file blocks per TEE file?\r\nYou can refer design document here: https://docs.google.com/document/d/1nvzAb472hBXsuZgLqEgDZIXFiefuHjN0XbD6iyxqNaM/edit?usp=sharing\r\n\r\nWe have 2 reasons to have multiple REE file blocks.\r\n1. Improve data encryption performance, we calculate MAC for whole TEE file before. And now we calculate MAC for one TEE file block. (we don't need to read whole file in just for modify one byte)\r\n2. Improve performance when supporting atomic update. To support atomic update, we need to do out-of-place update. e.g. copy file context and write new data to the copied version. split file into blocks can reduce the data to copy.\r\n\r\nI am not sure if I understand correctly what you mean to having tee-supplicant manipulate blocks in a single file. To having tee-supplicant manipulate blocks in single file, we need to change REE/TEE interface from file-based to block-based, and implement a simple file system on it."}}