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: <5e9821061002040009t27fc5a81m5075508f3a6634a6@mail.gmail.com>
Date:	Thu, 4 Feb 2010 10:09:57 +0200
From:	Oleg Kutkov <elenbert@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: Fwd: Problem with set_memory_rw

set_memory_rw()'s 1st argument requires virtual address.
So, you need virtual address of the page you want.

 - phys_to_virt() ... convert physical address to virtual address.
 - virt_to_phys() ... convert virtual address to physical.

Anyway, RW is vitual address mapping's attribute and not for physical.

Thanks,
-Kame



Thank for answer!
But this is a very strange, because 0x0509940 - it a virtual memory
address (i got it from System.map, this is a system call table, on my
machine). set_memory_rw return zero, anyway. Maybe, system call table
is much write protected, so i can't change attribute of memory page?
One more interesting thing:



struct page *pg;
pg = virt_to_page(addr);
unsigned long page_addr;
page_addr = (unsigned long) page_address(pg);


addr - this is my virtual address (provided by System.map)
But page_addr got another value!
What wrong?
Sorry, if my questions is to stupid.

P.S. I know, that overwriting system call table is very bad, i just
experimenting with my own network drivers and i need to replace some
network system calls..


Best regard,
Oleg.
--
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