dm-verity data struct and data distribution in fec_open
2017-08-24 17:53:44 0 举报
dm-verity system data struct 注:表格不太好用,只能等间距,差评;
作者其他创作
大纲/内容
struct fec_handle
val
ecc_info ecc
-
int fd
file desp (0)
int flags
FEC_VERITY_DISABLE
int mode
O_RDONLY
pthread_mutex
/
uint64_t errors
0
uint64_t data_size
DE3E1000:DC80F000
uint64_t pos
uint64_t size
0xE0000000
verity_info verity
func __ecc_read
offset
0xDE3D9000
rsb
0xD15000=offset%(rounts*FEC_BLOCKSIZE)
interleaved
rsb+i*rounds*FEC_BLOCKSIZE
data_index
252
func load_ecc
0xDFFFF000
func parse_table
0xDE3D910C
struct fec_header
uint32_t magic
0xfecfecfe
uint32_t version
uint32_t size
60
uint32_t roots
2
uint32_t fec_size
0x1C1E000=2*3599*4k
uint64_t inp_size
0xDE3E1000
uint_8 hash[]
1.read from flash;2.calculate by fec_data;
strcut verity_header
0xb001b001
uint8_t signature[]
uint32_t length
236
struct ecc_info
bool valid
int roots
FEC_DEFAULT_ROOTS(2)
int rsn
FEC_RSM(255) - roots
fec_header.fec_size
uint64_t blocks
ceil(data_size/FEC_BLOCKSIZE)
uint64_t rounds
3599=ceil(blocks/rsn)
uint64_t start
fec_header.inp_size
hash
struct verity_info
bool disabled
char *table
uint32_t hash_data_blocks
uint32_t hash_size
uint64_t hash_data_offset
uint64_t hash_start
0xDC80F000=903183*4k
uint8_t *hash
uint32_t salt_size
32
uint8_t *salt
uint64_t data_blocks
903183
uint64_t metadata_start
uint8_t zero_hash[]
verity_header header
raw_read from flash;
verity_header ecc_header
fec_pread from flash;
0 条评论
下一页