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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <87k4hgn8qa.fsf@inspiron.ap.columbia.edu>
Date:	Thu, 03 Feb 2011 15:50:21 -0500
From:	Nikolaus Rath <Nikolaus@...h.org>
To:	linux-kernel@...r.kernel.org
Subject: Reversing a memory mapping?

Hello,

I am trying to outsmart the proprietary nvidia driver to get my own
driver to access to a memory region set up by the nvidia driver.

Strace tells me that the nividia userspace library is calling

mmap2(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_SHARED, 5, 0x35375)

to get a userspace pointer to the kernel memory that I'm interested in.

Is there a way that my own kernel module can "reverse" this mmap call?
I.e. given the userspace pointer, how do I get access to the physical
location of the memory that has been mapped?

I know that the region is pinned and used as a DMA buffer for
communication with the GPU. I want my own device to do DMA transfers to
and from the same location.



Thanks,

   -Nikolaus

-- 
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C

--
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