<div dir="ltr">Sending it again my query, after i subscribed to the mailing list.<br><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi, </div><div><br></div><div>This is regarding the behavior of dm-verity on Android. Could you please provide your valuable suggestions?<br><br>[Issue]: <br>During development on android device after some usage of deviceĀ , I could see the following logs from dm-verity driver</div><div><a href="https://android.googlesource.com/kernel/msm/+/android-6.0.1_r0.9/drivers/md/dm-verity.c#379" target="_blank">https://android.googlesource.com/kernel/msm/+/android-6.0.1_r0.9/drivers/md/dm-verity.c#379</a></div><div><br></div><div>[dmesg]:</div><div>dm-verity: data block 77897 is corrupted </div><div><br></div><div>I think this indicates that data block 77897 in partition on which dm-verity is enabled is corrupted. Means some hash mismatch occurred with the predefined hash.</div><div><br></div><div>[Debugging]: </div><div>The /dev/block/dm-0 is mounted successfully on ext4 partition.</div><div><br></div><div>So I thought it could be a filesystem corruption issue, but it does not seems to be. </div><div>I compared the system partition of the device in which the log is observed and compared it with the sameĀ S/W in which the issue is not observed. </div><div><br></div><div>There seems to be no difference.</div><div><br></div><div>I am suspecting that it can be due to OS corruption or some bug in dm-verity module.</div><div><br></div><div>Could you please suggest how to proceed further?</div><div><br></div><div>P.S.:</div><div>In my understanding correct about dm-verity in above case. At runtime, dm-verity calculates the hash of each block when its read and verifies it by traversing the precalculated hash tree. As dm-verity depends on a precalculated hash tree over all blocks of a device, the underlying device must be mounted read-only in order for verification to be possible. In system partition dm-verity is enabled that hold system files, so system files can be changed during OS updates through OTA. Any other change indicates either OS(RAM) or disk(eMMC) corruption, or that a malicious program is trying to modify the OS or masquerade as a system file. </div><div><br></div><div>Thanks in advance !</div><div><br></div><div>Best Regards</div><div>KK</div></div>
</blockquote></div><br></div></div></div>