From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x92f.google.com ([2607:f8b0:4864:20::92f]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1gU7tL-0006AA-D2 for kernelnewbies@kernelnewbies.org; Tue, 04 Dec 2018 05:25:23 -0500 Received: by mail-ua1-x92f.google.com with SMTP id e16so5556739uam.12 for ; Tue, 04 Dec 2018 02:25:23 -0800 (PST) MIME-Version: 1.0 From: Pritam Bankar Date: Tue, 4 Dec 2018 15:54:09 +0530 Message-ID: Subject: Tracing memory address access in kernel To: kernelnewbies List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces+konstantin=linuxfoundation.org@kernelnewbies.org 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. crash> struct bio_vec 0xffff88009dc5eb00 struct bio_vec { bv_page = 0xffffea000a434b80, bv_len = 4096, bv_offset = 0 } crash> struct bio_vec 0xffff88009dc5eb10 struct bio_vec { bv_page = 0x0, bv_len = 4096, bv_offset = 0 } crash> struct bio_vec 0xffff88009dc5eb20 struct bio_vec { bv_page = 0xffffea000a467500, bv_len = 4096, bv_offset = 0 } I have allocated contagious memory for bio vectors. As you can see in second bio vector bv_page is getting set to NULL. This address is valid till the time I do some operations in my module. After some operations bv_page is getting set to NULL. Other fields are having valid data. 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 Thanks and regards, Pritam Bankar _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies