Re: Tracing memory address access in kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Pritam,

On Tue, Dec 4, 2018 at 10:26 AM Pritam Bankar
<pritambankar1988@xxxxxxxxx> 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
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux