Hi Pritam,

On Tue, Dec 4, 2018 at 10:26 AM Pritam Bankar
<[email protected]> wrote:
>
> Hello,
>
> I am facing issue of memory corruption where only one field of
> allocated structure is getting corrupted. I have bio structure and one
> of the page in bio vector is getting set to NULL.
>
<snip>
>
> Is there any debugging technique / tool available which will track
> access to specific memory access?  I would like to dump stack every
> time bv_page is accessed or modified

In these types of cases I usually use KASAN, or HW Breakpoint.
with HW Breakpoint you can set an alert to monitor any read or write
operation on some memory location. Check
samples/hw_breakpoint/data_breakpoint.c for an example of breakpoints.
KASAN can give you stacktraces when illegal memory access is done.
Hope it helps.

-- 
Regards
Sudip

_______________________________________________
Kernelnewbies mailing list
[email protected]
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to