lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 30 Nov 2009 16:12:21 +0530
From:	yogeshwar sonawane <yogyas@...il.com>
To:	linux-kernel <linux-kernel@...r.kernel.org>
Subject: finding kernel virtual addr from physical addr of a user buffer

Hi all,

I want to see/monitor/check/read the data of a user buffer. The idea
is like this :-

There is a network card which is sending/receiving the data. Many
applications are using that card.
Sometimes i am getting an application level error saying received data
is corrupt. I want to see/print send and receive buffer.
Having application level changes for printing is out of scope as there
can be multiple applications running simultaneous.

We have modified our card's firmware so that it will dump the Physical
addresses of user buffers which are sent or received.
After reading the dumped PA, we will pass a single PA to a driver
through sysfs file. Then we will cat the sysfs file which should show
the one page buffer contents corresponding to passed PA.

For this to work, the driver has to have access to the PA. First, i am
finding page frame no. (pfn) by right-shifting PA. Then kmap() is
called using pfn_to_page().
This will give kernel virtual address which can be used to print/show
data during "cat sysfs file" command.

1) Whether the above mentioned steps are correct ? Kindly comment.

2) In the driver store() function, i have modified the contents by
using kernel virtual address. But sometimes i am not able to see the
modified contents at user level.
Kindly suggest what can be the problem ?

3) Kindly suggest any other way to see/check user buffer contents when
PA is available ?

Thanking you,
Yogeshwar
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ