On certain devices, KernelPatch was reading offset without ensuring proper alignment before storing it in the inst variable. This misalignment could cause errors in subsequent operations that rely on the offset, leading to incorrect patching, throwing Segmentation fault in the end. This commit adds automatic alignment checks and adjustments to ensure that the offset is properly aligned before use.
On certain devices, KernelPatch was reading offset without ensuring proper alignment before storing it in the
inst
variable. This misalignment could cause errors in subsequent operations that rely on the offset, leading to incorrect patching, throwing Segmentation fault in the end. This commit adds automatic alignment checks and adjustments to ensure that the offset is properly aligned before use.