Home
last modified time | relevance | path

Searched refs:file (Results 1 – 25 of 113) sorted by relevance

12345

/trusty/user/app/storage/
Dfile.c90 const struct block_mac* file) { in file_block_map_init() argument
94 if (!block_mac_valid(tr, file)) { in file_block_map_init()
97 file_entry_ro = block_get(tr, file, NULL, &file_entry_ro_ref); in file_block_map_init()
111 block_mac_to_block(tr, file)); in file_block_map_init()
114 block_mac_to_block(tr, file)); in file_block_map_init()
125 const struct storage_file_handle* file) { in file_print() argument
130 file_block_map_init(tr, &block_map, &file->block_mac); in file_print()
131 file_entry_ro = block_get(tr, &file->block_mac, NULL, &file_entry_ro_ref); in file_print()
134 block_mac_to_block(tr, &file->block_mac)); in file_print()
140 block_mac_to_block(tr, &file->block_mac), file_entry_ro->info.path, in file_print()
[all …]
Dclient.c180 struct storage_file_handle* file; in session_close_all_files() local
183 file = session->files[f_handle]; in session_close_all_files()
184 if (file) { in session_close_all_files()
185 file_close(file); in session_close_all_files()
186 free(file); in session_close_all_files()
201 struct storage_file_handle* file; in create_file_handle() local
213 file = calloc(1, sizeof(*file)); in create_file_handle()
214 if (!file) { in create_file_handle()
219 session->files[handle] = file; in create_file_handle()
223 *file_p = file; in create_file_handle()
[all …]
Dfile.h63 bool (*file)(struct file_iterate_state* iter, member
72 struct storage_file_handle* file,
76 struct storage_file_handle* file,
82 struct storage_file_handle* file,
93 struct storage_file_handle* file,
96 struct storage_file_handle* file,
99 void file_print(struct transaction* tr, const struct storage_file_handle* file);
102 bool file_check(struct transaction* tr, const struct storage_file_handle* file);
143 struct storage_file_handle* file,
146 void file_close(struct storage_file_handle* file);
[all …]
DREADME.md4 secure apps. All operations that modify the file system state are transactional.
27 the same file system. Apps should not create files with the same name using
28 different ports, as it is device specific which ports share file systems.
40 - super - Super block load/store and file system initialization.
46 - file - File management.
52 - block_device_tipc - Implements block operations needed by the file system.
53 - client_tipc - Implement the secure storage tipc api on top of the file system.
57 The file system stores two super-blocks on a device that has tamper detection.
58 The rest of the data can be stored in a non-secure partition or file. The
59 default implementation has two file systems. One file system stores the
[all …]
/trusty/user/base/lib/storage/rust/src/
Dtransaction.rs84 file: &SecureFile, in read_all()
87 self.session.read_all(file, buf) in read_all()
106 file: &SecureFile, in read_at()
110 self.session.read_at(file, offset, buf) in read_at()
118 pub fn write_all(&mut self, file: &mut SecureFile, buf: &[u8]) -> Result<(), Error> { in write_all()
119 self.session.write_all_impl(file, buf, false) in write_all()
129 file: &mut SecureFile, in write_at()
133 self.session.write_at_impl(file, offset, buf, false) in write_at()
137 pub fn get_size(&mut self, file: &SecureFile) -> Result<usize, Error> { in get_size()
138 self.session.get_size(file) in get_size()
[all …]
Dtest.rs80 let mut file = session.open_file(file_name, OpenMode::Open).unwrap(); in read_at() localVariable
84 let result = session.read_at(&mut file, 3, data); in read_at()
92 let result = session.read_at(&mut file, 10, data); in read_at()
110 let mut file = session.open_file(file_name, OpenMode::Create).unwrap(); in write_at() localVariable
111 session.write_all(&mut file, file_contents.as_bytes()).unwrap(); in write_at()
114 let result = session.write_at(&mut file, 7, b"Trusty"); in write_at()
119 let result = session.read_all(&file, data); in write_at()
125 assert_eq!(Ok(()), transaction.write_at(&mut file, 7, b"C")); in write_at()
128 let result = session.read_all(&file, data); in write_at()
134 let result = session.write_at(&mut file, 7, b"too long data"); in write_at()
[all …]
Dlib.rs273 let mut file = MaybeUninit::uninit(); in open_file_impl() localVariable
278 sys::storage_open_file(self.raw, file.as_mut_ptr(), name.as_ptr(), flags, ops_flags) in open_file_impl()
284 let raw = unsafe { file.assume_init() }; in open_file_impl()
302 let file = self.open_file_impl(path, OpenMode::Open, false)?; in read() localVariable
303 self.read_all(&file, buf) in read()
323 let mut file = self.open_file_impl(path, OpenMode::Create, false)?; in write() localVariable
324 self.write_all(&mut file, buf) in write()
345 file: &SecureFile, in read_all()
351 let size = self.get_size(file)?; in read_all()
356 self.read_at(file, 0, buf) in read_all()
[all …]
/trusty/vendor/google/aosp/ide/vscode/
Dinstall.sh76 local file="$1"
77 local source="$SCRIPT_FOLDER/$file"
78 local dest="$VSCODE_FOLDER/$file"
81 echo "Skipping copying of $file"
86 echo "Backing up previous $file to $file.old"
90 echo "Copying $file"
Dkill_qemu_from_vscode.py47 print("Could not find vscode's node process", file=sys.stderr)
52 print("Could not find the run process", file=sys.stderr)
58 print("Could not find the qemu.py process", file=sys.stderr)
/trusty/user/app/keymaster/
Dtrusty_secure_deletion_secret_storage.cpp342 bool zero_entries(const StorageFile& file, in zero_entries() argument
355 if (!file.WriteBlock(pos, zero_buf, sizeof(zero_buf))) { in zero_entries()
368 std::optional<uint32_t /* keySlot */> find_empty_slot(const StorageFile& file, in find_empty_slot() argument
371 std::min(file.size(), isUpgrade ? kMaxSecretFileSizeForUpgrades in find_empty_slot()
376 std::optional<Buffer> block = file.ReadBlock(filePos, kBlockSize); in find_empty_slot()
434 std::optional<StorageFile> file = in LoadOrCreateFactoryResetSecret() local
436 if (!file) { in LoadOrCreateFactoryResetSecret()
442 if (file->size() > 0) { in LoadOrCreateFactoryResetSecret()
444 std::optional<Buffer> block = file->ReadBlock(kFactoryResetSecretPos, in LoadOrCreateFactoryResetSecret()
457 LOG_I("Created new secure secrets file, size %" PRIu64, file->size()); in LoadOrCreateFactoryResetSecret()
[all …]
Dkeymaster_attributes.proto5 * you may not use this file except in compliance with the License.
17 // We check in the prebuilt nanopb protobuf file under the current folder
20 // protobuf installed. You need to generate and check in the new protobuf file
21 // if you change this file in order for the change to take effect!
23 // To generate the file using the tool chain in trusty tree, add the following
30 // The generated .pb.c and .pb.h file would be under PB_GEN_DIR, include them
33 // To generate the file using your own tool chain, please follow the guide at
Dbuild-config-usertests4 # you may not use this file except in compliance with the License.
15 # This file lists userspace tests
/trusty/user/app/storage/test/block_host_test/
Dblock_test.c292 const struct block_mac* file); in mark_files_in_use()
1037 struct storage_file_handle* file, in open_test_file_etc() argument
1042 result = file_open(tr, path, file, create, allow_repaired); in open_test_file_etc()
1045 path, create, block_mac_to_block(tr, &file->block_mac)); in open_test_file_etc()
1049 assert(result != FILE_OP_SUCCESS || block_mac_valid(tr, &file->block_mac)); in open_test_file_etc()
1053 struct storage_file_handle* file, in open_test_file() argument
1056 open_test_file_etc(tr, file, path, create, FILE_OP_SUCCESS); in open_test_file()
1069 struct storage_file_handle file[tr_count]; in file_allocate_all_test() local
1083 open_test_file(&tr[i], &file[i], path, create); in file_allocate_all_test()
1084 file_size[i] = file[i].size; in file_allocate_all_test()
[all …]
/trusty/user/base/app/apploader/
Dapp_version.cpp80 file_handle_t file; in get_app_storage_version() local
81 rc = storage_open_file(session, &file, file_name.data(), 0, 0); in get_app_storage_version()
94 rc = storage_read(file, 0, &file_version, sizeof(file_version)); in get_app_storage_version()
104 storage_close_file(file); in get_app_storage_version()
122 file_handle_t file; in update_app_version() local
123 rc = storage_open_file(session, &file, file_name.data(), in update_app_version()
130 rc = storage_write(file, 0, &new_version, sizeof(new_version), in update_app_version()
139 storage_close_file(file); in update_app_version()
/trusty/user/app/storage/test/storage_host_test/
Dstorage_host_test.c60 struct storage_file_handle* file, in open_test_file_etc() argument
67 result = file_open(tr, path, file, create, allow_repaired); in open_test_file_etc()
70 path, create, block_mac_to_block(tr, &file->block_mac)); in open_test_file_etc()
75 block_mac_valid(tr, &file->block_mac)); in open_test_file_etc()
81 struct storage_file_handle* file, in open_test_file() argument
84 open_test_file_etc(tr, file, path, create, FILE_OP_SUCCESS, false); in open_test_file()
89 struct storage_file_handle* file, in file_test_open() argument
102 block_data_rw = file_get_block_write(tr, file, i, true, &ref); in file_test_open()
118 file_block_put_dirty(tr, file, i, in file_test_open()
122 if (file->size < i * file_block_size) { in file_test_open()
[all …]
/trusty/user/app/keymint/
Dsecure_storage_manager.rs87 let file = self in write_all() localVariable
91 session.write_all(file, data).map_err(|e| { in write_all()
106 if let Some(file) = self.secure_file.take() { in drop()
107 file.close(); in drop()
133 let mut file = create_attestation_key_file(algorithm)?; in write_protobuf_to_attestation_key_file() localVariable
134 file.write_all(&serialized_buffer).map_err(|e| { in write_protobuf_to_attestation_key_file()
235 let mut file = create_attestation_id_file()?; in provision_attestation_id_file() localVariable
274 file.write_all(&serialized_buffer).map_err(|e| { in provision_attestation_id_file()
299 let file = match session.open_file(file_name, OpenMode::Open) { in get_file_contents() localVariable
300 Ok(file) => file, in get_file_contents()
[all …]
/trusty/user/app/sample/hwcryptohal/common/
Derr.rs33 file: std::file!(),
44 HalError { code: i32, file: &'static str, line: u32, message: String },
94 HwCryptoError::HalError { code, file, line, message } => { in from()
96 format!("HWCrypto error on {}:{}: {}", file, line, message).as_str(), in from()
/trusty/user/app/storage/test/storage-unittest-aidl/unittests/
Dmod.rs64 let file = assert_ok!(ss.openFile(fname1, CREATE_EXCLUSIVE)); in create_move_delete() localVariable
68 assert_ok!(file.rename(fname2, CreationMode::CREATE_EXCLUSIVE)); in create_move_delete()
102 let file = assert_ok!(ss.openFile(fname1, CREATE_EXCLUSIVE)); in create_move_delete() localVariable
106 match file.rename(fname2, CreationMode::CREATE_EXCLUSIVE) { in create_move_delete()
188 let file = assert_ok!(ss.openFile(fname, CREATE_EXCLUSIVE)); in write_read_sequential() localVariable
191 assert_ok!(write_pattern(&*file, 0, chunks, chunk_len)); in write_read_sequential()
194 assert_ok!(read_pattern(&*file, 0, chunks, chunk_len)); in write_read_sequential()
198 let file = assert_ok!(ss.openFile(fname, NO_CREATE)); in write_read_sequential() localVariable
199 assert_ok!(read_pattern(&*file, 0, chunks, chunk_len)); in write_read_sequential()
Dhelpers.rs104 file: &dyn IFile, in write_pattern()
115 let written = file in write_pattern()
130 file: &dyn IFile, in read_pattern()
139 let read = file in read_pattern()
/trusty/user/base/include/user/
DAUTHORS2 # This file is distinct from the CONTRIBUTORS files.
5 # Names should be added to this file as:
/trusty/user/app/cast-auth/
Dbuild-config-usertests4 # you may not use this file except in compliance with the License.
15 # This file lists userspace tests
18 # Storage tests which require a nonsecure file
/trusty/kernel/
DAUTHORS2 # This file is distinct from the CONTRIBUTORS files.
5 # Names should be added to this file as:
/trusty/device/arm/generic-arm64/project/qemu/
Drun-qemu-helper57 -drive file=${ANDROID_BUILD_DIR}/userdata.img,index=2,if=none,id=hdc,format=raw
59 -drive file=${ANDROID_BUILD_DIR}/vendor.img,index=1,if=none,id=hdb,format=raw
61 -drive file=${ANDROID_BUILD_DIR}/system.img,index=0,if=none,id=hda,format=raw
Dlldb_support.py135 print(f"Could not find symbols file for UUID {uuid}", file=result)
149 print("Loading kernel ELF file", file=result)
154 file=result
162 print(f"Setting kernel ELF entry point to {hex(new_base)}", file=result)
/trusty/kernel/lib/libc-trusty/include/trusty/
Dio_handle.h21 io_handle_t* file_io_handle(FILE* file);

12345